{
    "mode": "man",
    "parameter": "ppmtoilbm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ppmtoilbm/1/json",
    "generated": "2026-09-04T02:11:48Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "ppmtoilbm - convert a PPM image into an ILBM file\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "ppmtoilbm",
                    "content": "[-maxplanes|-mp N]\n\n[-fixplanes|-fp N]\n\n[-ham6|-ham8]\n\n[{-dcbits|-dcplanes} r g b]\n\n[ -normal|-hamif|-hamforce|-24if|-24force| -dcif|-dcforce|-cmaponly ]\n\n[-ecs|-aga]\n\n[-compress|-nocompress]\n\n[-cmethod type]\n\n[-map ppmfile]\n\n[ppmfile]\n\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\nppmtoilbm  reads  a  PPM  image as input.  Produces an ILBM file as output.  ppmtoilbm under‐\nstands the following ILBM types:\n\n\n\n\n•      Normal ILBMs with 1-16 planes\n\n\n•      Amiga HAM with 3-16 planes\n\n\n•      24 bit\n\n\n•      Color map (BMHD + CMAP chunk only, nPlanes = 0)\n\n\n•      Unofficial direct color.  1-16 planes for each color component.\n\n\n\nChunks written: BMHD, CMAP, CAMG (only for HAM), BODY (not  for  colormap  files)  unofficial\nDCOL chunk for direct color ILBM.\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), ppmtoilbm recognizes the following command line options:\n\nOptions marked with (*) can be prefixed with a \"no\", e.g. \"-nohamif\".  All options can be ab‐\nbreviated to their shortest unique prefix.\n\n\n",
            "subsections": [
                {
                    "name": "-maxplanes  -mp _",
                    "content": "(default 5, minimum 1, maximum 16) Maximum planes to write in a normal ILBM.   If  the\nimage does not fit into <n> planes, ppmtoilbm writes a HAM file (if -hamif is used), a\n24bit file (if -24if is used) or a direct color file (if -dcif is used) or aborts with\nan error.\n\n"
                },
                {
                    "name": "-fixplanes  -fp _",
                    "content": "(min 1, max 16) If a normal ILBM is written, it will have exactly <n> planes.\n\n"
                },
                {
                    "name": "-hambits  -hamplanes _",
                    "content": "(default 6, min 3, max 16) Select number of planes for HAM picture.  The current Amiga\nhardware understands 6 and 8 planes, so for now you should only use this values.\n\n"
                },
                {
                    "name": "-normal",
                    "content": "Turns  off  -hamif/-24if/-dcif,  -hamforce/-24force/-dcforce and -cmaponly.  Also sets\ncompression type to byterun1.\n\nThis is the default.\n\n"
                },
                {
                    "name": "-hamif",
                    "content": ""
                },
                {
                    "name": "-24if",
                    "content": ""
                },
                {
                    "name": "-dcif",
                    "content": "Write a HAM/24bit/direct color file if the image does not fit into <maxplanes> planes.\n\n"
                },
                {
                    "name": "-hamforce",
                    "content": ""
                },
                {
                    "name": "-24force",
                    "content": ""
                },
                {
                    "name": "-dcforce",
                    "content": "Write a HAM/24bit/direct color file.\n\n"
                },
                {
                    "name": "-dcbits _",
                    "content": ""
                },
                {
                    "name": "-dcplanes _",
                    "content": "(default 5, min 1, max 16).  Select number of bits for red, green and blue in a direct\ncolor ILBM.\n\n"
                },
                {
                    "name": "-ecs",
                    "content": "This is the default.\n\n"
                },
                {
                    "name": "-aga    -hamplanes 8 -maxplanes 8",
                    "content": ""
                },
                {
                    "name": "-ham6   -hamplanes 6 -hamforce",
                    "content": ""
                },
                {
                    "name": "-ham8   -hamplanes 8 -hamforce",
                    "content": ""
                },
                {
                    "name": "-compress",
                    "content": "This is the default.  Compress the BODY chunk.   The  default  compression  method  is\nbyterun1.  Compression requires building the ILBM image in memory; turning compression\noff  allows stream-writing of the image, but the resulting file will usually be 30% to\n50% larger.  Another alternative is the -savemem option, this  will  keep  memory  re‐\nquirements for compression at a minimum, but is very slow.\n\n"
                },
                {
                    "name": "-cmethod none",
                    "content": "This option does the same thing as -compress.\n\n"
                },
                {
                    "name": "-map _",
                    "content": "Write  a normal ILBM using the colors in <ppmfile> as the colormap.  The colormap file\nalso determines the number of planes; -maxplanes and -fixplanes are ignored.\n\n"
                },
                {
                    "name": "-cmaponly",
                    "content": "Write a colormap file: only BMHD and CMAP chunks, no BODY chunk, nPlanes = 0.\n\n"
                },
                {
                    "name": "-savemem",
                    "content": "See the -compress option.\n\n\n\n\n"
                }
            ]
        },
        "LIMITATIONS": {
            "content": "HAM pictures will always get a grayscale colormap; a real  color  selection  algorithm  might\ngive  better results.  On the other hand, this allows row-by-row operation on HAM images, and\nall HAM images of the same depth (no. of planes) share a common colormap, which is useful for\nbuilding HAM animations.\n\n",
            "subsections": []
        },
        "REFERENCES": {
            "content": "Amiga ROM Kernel Reference Manual - Devices (3rd Ed.)  Addison Wesley, ISBN 0-201-56775-X\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ppm(1), ilbmtoppm(1)\n\n\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "For about a year in 1993-1994, there was a -savemem option.\n\nThere used to be a -floyd (aka -fs) option that was supposed\nto cause images to be dithered so that a larger number of colors in the PPM\ninput could be represented in a smaller number of colors in the ILBM output.\nBut it was never documented.  Furthermore, developers discovered in January\n2022 that the code for this was nonfunctional because of defects, and had\nbeen for a very long time and maybe always.  Finally,, this functions is not\nappropriate in the Netpbm philosophy, because dithering should be done by a\nseparate dithering program, not a format conversion program.  Indeed,\nthe programs ppmdither, pnmquant, and pnmremap can do\nthis.\n\nTherefore, since Netpbm 10.98 (March 2022), the dithering code has not been\nin the program and any attempt to use the options fails with a simple\ninvalid option message.  But the -nofloyd and -nofs options\nremain, doing nothing as they were designed to do, and still not documented.\nThis is just in case something uses those options, since the cost of\nmaintaining them is so small.\n\n\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Copyright (C) 1989 by Jef Poskanzer.\n\nModified October 1993 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/ppmtoilbm.html\n\nnetpbm documentation                       15 January 2022                  Ppmtoilbm User Manual(1)",
            "subsections": []
        }
    },
    "summary": "ppmtoilbm - convert a PPM image into an ILBM file",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "(default 5, minimum 1, maximum 16) Maximum planes to write in a normal ILBM. If the image does not fit into <n> planes, ppmtoilbm writes a HAM file (if -hamif is used), a 24bit file (if -24if is used) or a direct color file (if -dcif is used) or aborts with an error."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "(min 1, max 16) If a normal ILBM is written, it will have exactly <n> planes."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "(default 6, min 3, max 16) Select number of planes for HAM picture. The current Amiga hardware understands 6 and 8 planes, so for now you should only use this values."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Turns off -hamif/-24if/-dcif, -hamforce/-24force/-dcforce and -cmaponly. Also sets compression type to byterun1. This is the default."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write a HAM/24bit/direct color file if the image does not fit into <maxplanes> planes."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write a HAM/24bit/direct color file."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "(default 5, min 1, max 16). Select number of bits for red, green and blue in a direct color ILBM."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This is the default."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This is the default. Compress the BODY chunk. The default compression method is byterun1. Compression requires building the ILBM image in memory; turning compression off allows stream-writing of the image, but the resulting file will usually be 30% to 50% larger. Another alternative is the -savemem option, this will keep memory re‐ quirements for compression at a minimum, but is very slow."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option does the same thing as -compress."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write a normal ILBM using the colors in <ppmfile> as the colormap. The colormap file also determines the number of planes; -maxplanes and -fixplanes are ignored."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Write a colormap file: only BMHD and CMAP chunks, no BODY chunk, nPlanes = 0."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "See the -compress option."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "ppm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/1/json"
        },
        {
            "name": "ilbmtoppm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ilbmtoppm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a PPM image to an ILBM file.",
        "examples": [
            {
                "description": "Convert a PPM image to an ILBM file",
                "command": "ppmtoilbm {{path/to/file.ppm}} > {{path/to/file.ilbm}}"
            },
            {
                "description": "Write a maximum of `n` planes to the ILBM file and produce a HAM/24bit/direct color file if this number is exceeded",
                "command": "ppmtoilbm {{-mp|-maxplanes}} {{n}} -{{hamif|24if|dcif}} {{path/to/file.ppm}} > {{path/to/file.ilbm}}"
            },
            {
                "description": "Produce a ILBM file with exactly `n` planes",
                "command": "ppmtoilbm {{-fp|-fixplanes}} {{n}} {{path/to/file.ppm}} > {{path/to/file.ilbm}}"
            },
            {
                "description": "Select the compression method to be used",
                "command": "ppmtoilbm -{{compress|nocompress|savemem}} {{path/to/file.ppm}} > {{path/to/file.ilbm}}"
            }
        ]
    }
}