{
    "content": [
        {
            "type": "text",
            "text": "# giftopnm (man)\n\n## NAME\n\ngiftopnm - convert a GIF file into a portable anymap\n\n## SYNOPSIS\n\ngiftopnm [--alphaout={alpha-filename,-}] [-verbose] [-comments] [-image N] [GIFfile]\n\n## DESCRIPTION\n\nThis  is  a  graphics format converter from the GIF format to the PNM (i.e. PBM, PGM, or PPM)\nformat.\n\n## TLDR\n\n> Convert a GIF file into a PNM image.\n\n- Convert a GIF image to a Netpbm image pixel-for-pixel:\n  `giftopnm {{path/to/input.gif}} > {{path/to/output.pnm}}`\n- Display version:\n  `giftopnm {{-v|-version}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (3 subsections)\n- **RESTRICTIONS**\n- **SEE ALSO**\n- **AUTHOR**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "giftopnm",
        "section": "",
        "mode": "man",
        "summary": "giftopnm - convert a GIF file into a portable anymap",
        "synopsis": "giftopnm [--alphaout={alpha-filename,-}] [-verbose] [-comments] [-image N] [GIFfile]",
        "tldr_summary": "Convert a GIF file into a PNM image.",
        "tldr_examples": [
            {
                "description": "Convert a GIF image to a Netpbm image pixel-for-pixel",
                "command": "giftopnm {{path/to/input.gif}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Display version",
                "command": "giftopnm {{-v|-version}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Produce verbose output about the GIF file input."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Only output GIF89 comment fields."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Output the specified gif image from the input GIF archive (where N is '1', '2', '20'...). Normally there is only one image per file, so this option is not needed. All flags can be abbreviated to their shortest unique prefix."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "ppmtogif",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmtogif/1/json"
            },
            {
                "name": "ppmcolormask",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmcolormask/1/json"
            },
            {
                "name": "pnmcomp",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcomp/1/json"
            },
            {
                "name": "gifsicle",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gifsicle/1/json"
            },
            {
                "name": "ppm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/ppm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 12,
                "subsections": [
                    {
                        "name": "-verbose",
                        "lines": 2
                    },
                    {
                        "name": "-comments",
                        "lines": 2
                    },
                    {
                        "name": "-image",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "RESTRICTIONS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 14,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "giftopnm - convert a GIF file into a portable anymap\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "giftopnm [--alphaout={alpha-filename,-}] [-verbose] [-comments] [-image N] [GIFfile]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This  is  a  graphics format converter from the GIF format to the PNM (i.e. PBM, PGM, or PPM)\nformat.\n\nIf the image contains only black and maximally bright white, the output is PBM.  If the image\ncontains  more  than  those two colors, but only grays, the output is PGM.  If the image con‐\ntains other colors, the output is PPM.\n\nIf you have an animated GIF file, you can extract individual frames from it with gifsicle and\nthen convert those using giftopnm.\n\nA GIF image contains rectangular pixels.  They all have the same aspect ratio, but may not be\nsquare (it's actually quite unusual for them not to be square, but  it  could  happen).   The\npixels of a Netpbm image are always square.  Because of the engineering complexity to do oth‐\nerwise, giftopnm converts a GIF image to a Netpbm image pixel-for-pixel.  This means  if  the\nGIF pixels are not square, the Netpbm output image has the wrong aspect ratio.  In this case,\ngiftopnm issues an informational message telling you to run pnmscale to correct the output.\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "--alphaout=alpha-filename\ngiftopnm creates a PGM (portable graymap) file containing the alpha channel values  in\nthe input image.  If the input image doesn't contain an alpha channel, the alpha-file‐\nname file contains all zero (transparent) alpha values.  If you  don't  specify  --al‐‐\nphaout,  giftopnm does not generate an alpha file, and if the input image has an alpha\nchannel, giftopnm simply discards it.\n\nIf you specify - as the filename, giftopnm writes the alpha output to Standard  Output\nand discards the image.\n\nSee pnmcomp(1) for one way to use the alpha output file.\n",
                "subsections": [
                    {
                        "name": "-verbose",
                        "content": "Produce verbose output about the GIF file input.\n"
                    },
                    {
                        "name": "-comments",
                        "content": "Only output GIF89 comment fields.\n"
                    },
                    {
                        "name": "-image",
                        "content": "Output  the  specified  gif  image  from  the  input GIF archive (where N is '1', '2',\n'20'...).  Normally there is only one image per file, so this option is not needed.\n\nAll flags can be abbreviated to their shortest unique prefix.\n\n"
                    }
                ]
            },
            "RESTRICTIONS": {
                "content": "This does not correctly handle the Plain Text Extension of the GIF89 standard,  since  I  did\nnot have any example input files containing them.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "ppmtogif(1), ppmcolormask(1), pnmcomp(1), gifsicle(1) <http://www.lcdf.org/gifsicle>, ppm(5).\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (c) 1993 by David Koblas (koblas@netcom.com)\n\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "If  you  use giftopnm, you are using a patent on the LZW compression method which is owned by\nUnisys, and in all probability you do not have a license from Unisys to do so.  Unisys  typi‐\ncally  asks $5000 for a license for trivial use of the patent.  Unisys has never enforced the\npatent against trivial users, and has made statements that it is much  less  concerned  about\npeople  using the patent for decompression (which is what giftopnm does than for compression.\nThe patent expires in 2003 / 2004, depending on the country.\n\nRumor has it that IBM also owns a patent covering giftopnm.\n\nA replacement for the GIF format that does not require any patents to use is the PNG format.\n\n\n\n13 January 2001                               giftopnm(1)",
                "subsections": []
            }
        }
    }
}