{
    "mode": "man",
    "parameter": "sgitopnm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/sgitopnm/1/json",
    "generated": "2026-10-21T23:38:40Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "sgitopnm - convert a SGI image file to PNM\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "sgitopnm",
                    "content": "[-verbose]\n\n[-channel c]\n\n[SgiFileName]\n\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\nsgitopnm reads an SGI image file as input and produces a PGM image for a 2-dimensional (1- or\n2-channel) input file, and a PPM image for a 3-dimensional (3 or more channels) input file.\n\nAlternatively, the program produces a PGM image of any one of the channels in the input file.\n\nBefore Netpbm 10.67 (June 2014), sgitopnm does not work on 2-channel SGI images.  It fails if\nyou try.\n\nIf you don't specify the SgiFileName argument, input is from Standard Input.\n\nBefore  Netpbm  10.67  (June 2014), sgitopnm requires its input to be a seekable file, so for\nexample you can't feed it from a pipe.\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee  Common Options ), sgitopnm recognizes the following command line options:\n\n\n",
            "subsections": [
                {
                    "name": "-verbose",
                    "content": "Give some information about the SGI image file.\n\n"
                },
                {
                    "name": "-channel _",
                    "content": "Extract channel n of the image as a PGM image.\n\nWithout  this option, sgitopnm extracts the first 3 channels as a PPM image or, if the\ninput has 1 or 2 channels, extracts the first channel as a PGM image.\n\nA 2-channel image is grayscale plus transparency, so you can get the transparency  in‐\nformation with -channel=2.  You could then combine them into a PAM image of tuple type\nGRAYSCALEALPHA with pamstack.\n\n\n\n"
                }
            ]
        },
        "REFERENCES": {
            "content": "The  SGI image format specification version 1.0 is at ftp://ftp.sgi.com/graphics/grafica/sgi‐\nimage.html .\n\nThere is an example SGI file at https://github.com/ZaaLabs/ZaaIL-TestImages/tree/master/SGI .\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pnm(1), pam(1), pnmtosgi(1), pamstack(1)\n\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1994 by Ingo Wilken ( Ingo.Wilken@informatik.uni-oldenburg.de)\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/sgitopnm.html\n\nnetpbm documentation                        25 April 2014                    Sgitopnm User Manual(1)",
            "subsections": []
        }
    },
    "summary": "sgitopnm - convert a SGI image file to PNM",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Give some information about the SGI image file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Extract channel n of the image as a PGM image. Without this option, sgitopnm extracts the first 3 channels as a PPM image or, if the input has 1 or 2 channels, extracts the first channel as a PGM image. A 2-channel image is grayscale plus transparency, so you can get the transparency in‐ formation with -channel=2. You could then combine them into a PAM image of tuple type GRAYSCALEALPHA with pamstack."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/1/json"
        },
        {
            "name": "pam",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pam/1/json"
        },
        {
            "name": "pnmtosgi",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmtosgi/1/json"
        },
        {
            "name": "pamstack",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamstack/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert an SGI file to a PNM file.",
        "examples": [
            {
                "description": "Convert an SGI image to a PNM file",
                "command": "sgitopnm {{path/to/input.sgi}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Display information about the SGI file",
                "command": "sgitopnm {{-verb|-verbose}} {{path/to/input.sgi}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Extract channel n of the SGI file",
                "command": "sgitopnm {{-c|-channel}} {{n}} {{path/to/input.sgi}} > {{path/to/output.pnm}}"
            }
        ]
    }
}