{
    "mode": "man",
    "parameter": "pnmtosgi",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmtosgi/1/json",
    "generated": "2026-06-16T01:01:29Z",
    "synopsis": "pnmtosgi [-verbatim|-rle] [-imagename Name] [pnmfile]",
    "sections": {
        "NAME": {
            "content": "pnmtosgi - convert a portable anymap to a SGI image file\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pnmtosgi [-verbatim|-rle] [-imagename Name] [pnmfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads  a  portable anymap as input. Produces an SGI image file as output.  The SGI image will\nbe 2-dimensional (1 channel) for PBM and PGM input, and 3-dimensional (3 channels) for PPM.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-verbatim",
                    "content": "Write an uncompressed file.\n"
                },
                {
                    "name": "-rle (default)",
                    "content": "Write a compressed (run length encoded) file.\n"
                },
                {
                    "name": "-imagename name",
                    "content": "Write the string \"name\" into the imagename field of the header.  The  name  string  is\nlimited  to  79  characters.  If no name is given, pnmtosgi writes \"no name\" into this\nfield.\n"
                }
            ]
        },
        "BUGS": {
            "content": "Probably.\n",
            "subsections": []
        },
        "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",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pnm(5), sgitopnm(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1994 by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)\n\n\n\n\n29 Januar 1994                                pnmtosgi(1)",
            "subsections": []
        }
    },
    "summary": "pnmtosgi - convert a portable anymap to a SGI image file",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write an uncompressed file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write a compressed (run length encoded) file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write the string \"name\" into the imagename field of the header. The name string is limited to 79 characters. If no name is given, pnmtosgi writes \"no name\" into this field."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pnm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
        },
        {
            "name": "sgitopnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sgitopnm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a PNM file to an SGI image file.",
        "examples": [
            {
                "description": "Convert a PNM image to an SGI image",
                "command": "pnmtosgi {{path/to/input.pnm}} > {{path/to/output.sgi}}"
            },
            {
                "description": "Disable or enable compression",
                "command": "pnmtosgi -{{verbatim|rle}} {{path/to/input.pnm}} > {{path/to/output.sgi}}"
            },
            {
                "description": "Write the specified string into the SGI image header's `imagename` field",
                "command": "pnmtosgi {{-i|-imagename}} {{string}} {{path/to/input.pnm}} > {{path/to/output.sgi}}"
            }
        ]
    }
}