{
    "mode": "man",
    "parameter": "sgitopnm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/sgitopnm/1/json",
    "generated": "2026-06-15T11:29:37Z",
    "synopsis": "sgitopnm [-verbose] [-channel c] [SGIfile]",
    "sections": {
        "NAME": {
            "content": "sgitopnm - convert a SGI image file to a portable anymap\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sgitopnm [-verbose] [-channel c] [SGIfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads an SGI image file as input.  Produces a PGM image for a 2-dimensional (1 channel) input\nfile, and a PPM image for a 3-dimensional (3 or more channels) input file.\n\nAlternatively, produces a PGM image of any one of the channels in the input file.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-verbose",
                    "content": "Give some information about the SGI image file.\n"
                },
                {
                    "name": "-channel",
                    "content": "Extract channel c of the image as a PGM image.  Without this option, sgitopnm extracts\nthe first 3 channels as a PPM image or, if the input has only 1 channel, extracts that\nas a PGM image, and if the input has 2 channels, fails.\n\n"
                }
            ]
        },
        "REFERENCES": {
            "content": "SGI Image File Format documentation (draft v0.95) by Paul Haeberli (paul@sgi.com).  Available\nvia ftp at sgi.com:graphics/SGIIMAGESPEC.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pnm(5), pnmtosgi(1)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1994 by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)\n\n\n\n\n29 Jul 2000                                 sgitopnm(1)",
            "subsections": []
        }
    },
    "summary": "sgitopnm - convert a SGI image file to a portable anymap",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Give some information about the SGI image file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Extract channel c 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 only 1 channel, extracts that as a PGM image, and if the input has 2 channels, fails."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pnm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
        },
        {
            "name": "pnmtosgi",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmtosgi/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}}"
            }
        ]
    }
}