{
    "mode": "man",
    "parameter": "pnmdepth",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmdepth/1/json",
    "generated": "2026-06-16T00:37:27Z",
    "synopsis": "pnmdepth newmaxval [pnmfile]",
    "sections": {
        "NAME": {
            "content": "pnmdepth - change the maxval in a portable anymap\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pnmdepth newmaxval [pnmfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads a portable anymap as input.  Scales all the pixel values, and writes out the image with\nthe new maxval.  Scaling the colors down to a smaller maxval will result in some loss of  in‐\nformation.\n\nBe  careful of off-by-one errors when choosing the new maxval.  For instance, if you want the\ncolor values to be five bits wide, use a maxval of 31, not 32.\n\nOne important use of pnmdepth is to convert a new format 2-byte-per-sample PNM  file  to  the\nolder  1-byte-per-sample  format.  Before April 2000, essentially all raw (binary) format PNM\nfiles had a maxval less than 256 and one byte per sample, and many programs may rely on that.\nIf  you  specify a newmaxval less than 256, the resulting file should be readable by any pro‐\ngram that worked with PNM files before April 2000.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pnm(5), ppmquant(1), ppmdither(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1989, 1991 by Jef Poskanzer.\n\n\n\n08 April 2000                                pnmdepth(1)",
            "subsections": []
        }
    },
    "summary": "pnmdepth - change the maxval in a portable anymap",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "pnm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
        },
        {
            "name": "ppmquant",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmquant/1/json"
        },
        {
            "name": "ppmdither",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmdither/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "This command is an alias of `pamdepth`.",
        "examples": [
            {
                "description": "View documentation for the original command",
                "command": "tldr pamdepth"
            }
        ]
    }
}