{
    "content": [
        {
            "type": "text",
            "text": "# pnmtopalm(1) (man)\n\n## TLDR\n\n> Convert a PNM image to a Palm bitmap.\n\n- Convert a PNM image to a Palm bitmap:\n  `pnmtopalm {{path/to/file.pnm}} > {{path/to/file.palm}}`\n- Specify the color depth of the resulting bitmap:\n  `pnmtopalm {{-dep|-depth}} {{1|2|4|8|16}} {{path/to/file.pnm}} > {{path/to/file.palm}}`\n- Choose a compression method for the resulting bitmap:\n  `pnmtopalm -{{scanline_compression|rle_compression|packbits_compression}} {{path/to/file.pnm}} > {{path/to/file.palm}}`\n- Build a custom colormap and include it in the resulting bitmap:\n  `pnmtopalm {{-c|-colormap}} {{path/to/file.pnm}} > {{path/to/file.palm}}`\n- Specify the bitmap's density:\n  `pnmtopalm {{-den|-density}} {{72|108|144|216|288}} {{path/to/file.pnm}} > {{path/to/file.palm}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** pnmtopalm - convert a portable anymap into a Palm pixmap\n\n**Synopsis:** pnmtopalm [-verbose] [-depth N] [-maxdepth N] [-colormap] [-transparent color] [-offset]\n[-rle-compression|-scanline-compression] [pnmfile]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | — | — | Display the format of the output file. |\n| — | — | — | Produce a file of depth N, where N must be either 1, 2, 4, 8, or 16. Any depth greater than 1 will produce a version 1 o |\n| — | — | — | Produce a file of minimal depth, but in any case less than N bits wide. If you spec‐ ify 16-bit, the output will always  |\n| — | — | — | Fill in the nextDepthOffset field in the file header, to provide for multiple rendi‐ tions of the pixmap in the same fil |\n| — | — | — | Build a custom colormap and include it in the output file. This is not recommended by Palm, for efficiency reasons. Othe |\n| — | — | — | Marks one particular color as fully transparent. The format to specify the color is either (when for example orange) \"1. |\n| — | — | — | Specifies that the output Palm bitmap will use the Palm RLE compression scheme, and will be a version 2 bitmap. RLE comp |\n| — | — | — | Specifies that the output Palm bitmap will use the Palm scanline compression scheme, and will be a version 2 bitmap. Sca |\n\n## See Also\n\n- palmtopnm(1)\n- ppmquant(1)\n- pnm(5)\n\n## Section Outline\n\n- **NAME** (3 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (12 lines)\n- **OPTIONS** (1 lines) — 8 subsections\n  - -verbose (2 lines)\n  - -depth (9 lines)\n  - -maxdepth (3 lines)\n  - -offset (3 lines)\n  - -colormap (4 lines)\n  - -transparent (6 lines)\n  - -rle-compression (3 lines)\n  - -scanline-compression (5 lines)\n- **SEE ALSO** (3 lines)\n- **NOTES** (9 lines)\n- **AUTHORS** (8 lines)\n\n## Full Content\n\n### NAME\n\npnmtopalm - convert a portable anymap into a Palm pixmap\n\n### SYNOPSIS\n\npnmtopalm [-verbose] [-depth N] [-maxdepth N] [-colormap] [-transparent color] [-offset]\n[-rle-compression|-scanline-compression] [pnmfile]\n\n### DESCRIPTION\n\nReads a PNM image as input, from stdin or pnmfile.  Produces a Palm pixmap as output.\n\nPalm  pixmap  files  are  either  greyscale files 1, 2, or 4 bits wide, or color files 8 bits\nwide, so pnmtopalm automatically scales colors to have  an  appropriate  maxval,  unless  you\nspecify  a depth or max depth.  Input files must have an appropriate number and set of colors\nfor the selected output constraints.  This often means that you  should  run  the  PNM  image\nthrough  ppmquant  before you pass it to pnmtopalm.  Netpbm comes with several colormap files\nyou can use with ppmquant for this purpose.  They are palmgray2.map (4 shades of gray  for  a\ndepth of 2), palmgray4.map (16 shades of gray for a depth of 4), and palmcolor8.map (232 col‐\nors in default Palm colormap).\n\n### OPTIONS\n\n#### -verbose\n\nDisplay the format of the output file.\n\n#### -depth\n\nProduce a file of depth N, where N must be either 1,  2,  4,  8,  or  16.   Any  depth\ngreater  than  1 will produce a version 1 or 2 bitmap.  Because the default Palm 8-bit\ncolormap is not grayscale, if the input is a grayscale or monochrome pixmap, the  out‐\nput will never be more than 4 bits deep, regardless of the specified depth.  Note that\n8-bit color works only in PalmOS 3.5 (and higher), and 16-bit direct color works  only\nin  PalmOS 4.0 (and higher).  However, the 16-bit direct color format is also compati‐\nble with the various PalmOS 3.x versions used in the Handspring Visor, so these images\nmay also work in that device.\n\n#### -maxdepth\n\nProduce  a file of minimal depth, but in any case less than N bits wide.  If you spec‐\nify 16-bit, the output will always be 16-bit direct color.\n\n#### -offset\n\nFill in the nextDepthOffset field in the file header, to provide for  multiple  rendi‐\ntions of the pixmap in the same file.\n\n#### -colormap\n\nBuild a custom colormap and include it in the output file.  This is not recommended by\nPalm, for efficiency reasons.  Otherwise, pnmtopalm uses the default Palm colormap for\ncolor output.\n\n#### -transparent\n\nMarks  one  particular color as fully transparent.  The format to specify the color is\neither (when for example orange) \"1.0,0.5,0.0\", where the values  are  floats  between\nzero and one, or with the syntax \"#RGB\", \"#RRGGBB\" or \"#RRRRGGGGBBBB\" where R, G and B\nare hexadecimal numbers.  This also makes  the  output  bitmap  a  version  2  bitmap.\nTransparency works only on Palm OS 3.5 and higher.\n\n#### -rle-compression\n\nSpecifies  that  the  output Palm bitmap will use the Palm RLE compression scheme, and\nwill be a version 2 bitmap.  RLE compression works only with Palm OS 3.5 and higher.\n\n#### -scanline-compression\n\nSpecifies that the output Palm bitmap will use the Palm scanline  compression  scheme,\nand  will  be  a version 2 bitmap.  Scanline compression works only in Palm OS 2.0 and\nhigher.\n\n### SEE ALSO\n\npalmtopnm(1), ppmquant(1), pnm(5)\n\n### NOTES\n\nAn additional compression format, packbits, was added with PalmOS 4.0.  This  package  should\nbe updated to be able to generate that.\n\nPalm  pixmaps  may  contains multiple renditions of the same pixmap, in different depths.  To\nconstruct an N-multiple-rendition Palm pixmap with pnmtopalm, first  construct  renditions  1\nthrough  N-1  using the -offset option, then construct the Nth pixmap without the -offset op‐\ntion.  Then concatenate the individual renditions together in a single file using cat.\n\n### AUTHORS\n\nThis program was originally written as ppmtoTbmp.c, by Ian Goldberg and George  Caswell.   It\nwas  completely  re-written by Bill Janssen to add color, compression, and transparency func‐\ntion.\nCopyright 1995-2001 by Ian Goldberg, George Caswell, and Bill Janssen.\n\n\n\n7 December 2000                              pnmtopalm(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "pnmtopalm",
        "section": "1",
        "mode": "man",
        "summary": "pnmtopalm - convert a portable anymap into a Palm pixmap",
        "synopsis": "pnmtopalm [-verbose] [-depth N] [-maxdepth N] [-colormap] [-transparent color] [-offset]\n[-rle-compression|-scanline-compression] [pnmfile]",
        "tldr_summary": "Convert a PNM image to a Palm bitmap.",
        "tldr_examples": [
            {
                "description": "Convert a PNM image to a Palm bitmap",
                "command": "pnmtopalm {{path/to/file.pnm}} > {{path/to/file.palm}}"
            },
            {
                "description": "Specify the color depth of the resulting bitmap",
                "command": "pnmtopalm {{-dep|-depth}} {{1|2|4|8|16}} {{path/to/file.pnm}} > {{path/to/file.palm}}"
            },
            {
                "description": "Choose a compression method for the resulting bitmap",
                "command": "pnmtopalm -{{scanline_compression|rle_compression|packbits_compression}} {{path/to/file.pnm}} > {{path/to/file.palm}}"
            },
            {
                "description": "Build a custom colormap and include it in the resulting bitmap",
                "command": "pnmtopalm {{-c|-colormap}} {{path/to/file.pnm}} > {{path/to/file.palm}}"
            },
            {
                "description": "Specify the bitmap's density",
                "command": "pnmtopalm {{-den|-density}} {{72|108|144|216|288}} {{path/to/file.pnm}} > {{path/to/file.palm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Display the format of the output file."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Produce a file of depth N, where N must be either 1, 2, 4, 8, or 16. Any depth greater than 1 will produce a version 1 or 2 bitmap. Because the default Palm 8-bit colormap is not grayscale, if the input is a grayscale or monochrome pixmap, the out‐ put will never be more than 4 bits deep, regardless of the specified depth. Note that 8-bit color works only in PalmOS 3.5 (and higher), and 16-bit direct color works only in PalmOS 4.0 (and higher). However, the 16-bit direct color format is also compati‐ ble with the various PalmOS 3.x versions used in the Handspring Visor, so these images may also work in that device."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Produce a file of minimal depth, but in any case less than N bits wide. If you spec‐ ify 16-bit, the output will always be 16-bit direct color."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Fill in the nextDepthOffset field in the file header, to provide for multiple rendi‐ tions of the pixmap in the same file."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Build a custom colormap and include it in the output file. This is not recommended by Palm, for efficiency reasons. Otherwise, pnmtopalm uses the default Palm colormap for color output."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Marks one particular color as fully transparent. The format to specify the color is either (when for example orange) \"1.0,0.5,0.0\", where the values are floats between zero and one, or with the syntax \"#RGB\", \"#RRGGBB\" or \"#RRRRGGGGBBBB\" where R, G and B are hexadecimal numbers. This also makes the output bitmap a version 2 bitmap. Transparency works only on Palm OS 3.5 and higher."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies that the output Palm bitmap will use the Palm RLE compression scheme, and will be a version 2 bitmap. RLE compression works only with Palm OS 3.5 and higher."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specifies that the output Palm bitmap will use the Palm scanline compression scheme, and will be a version 2 bitmap. Scanline compression works only in Palm OS 2.0 and higher."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "palmtopnm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/palmtopnm/1/json"
            },
            {
                "name": "ppmquant",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmquant/1/json"
            },
            {
                "name": "pnm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-verbose",
                        "lines": 2
                    },
                    {
                        "name": "-depth",
                        "lines": 9
                    },
                    {
                        "name": "-maxdepth",
                        "lines": 3
                    },
                    {
                        "name": "-offset",
                        "lines": 3
                    },
                    {
                        "name": "-colormap",
                        "lines": 4
                    },
                    {
                        "name": "-transparent",
                        "lines": 6
                    },
                    {
                        "name": "-rle-compression",
                        "lines": 3
                    },
                    {
                        "name": "-scanline-compression",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}