{
    "mode": "man",
    "parameter": "ppmntsc",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ppmntsc/1/json",
    "generated": "2026-07-05T11:50:05Z",
    "synopsis": "ppmntsc [ --pal ] [ --legalonly ] [ --illegalonly ] [ --correctedonly ] [ --verbose ] [ --de‐‐\nbug ] [ infile ]\nMinimum unique abbreviations of options are acceptable.",
    "sections": {
        "NAME": {
            "content": "ppmntsc - make a portable pixmap look like taken from an American TV\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ppmntsc [ --pal ] [ --legalonly ] [ --illegalonly ] [ --correctedonly ] [ --verbose ] [ --de‐‐\nbug ] [ infile ]\n\nMinimum unique abbreviations of options are acceptable.\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program makes colors legal in the NTSC (or PAL) color systems.  Often, images  generated\non  the  computer are made for use in movies which ultimately end up on video tape.  However,\nthe range of colors (as specified by their RGB values) on a computer does not match the range\nof  colors  that can be represented using the NTSC (or PAL) systems.  If an image with \"ille‐\ngal\" colors is sent directly to an NTSC (or PAL) video system for  recording,  the  \"illegal\"\ncolors will be clipped.  This may result in an undesirable looking picture.\n\nThis  utility  tests each pixel in an image to see if it falls within the legal NTSC (or PAL)\nrange.  If not, it raises or lowers the pixel's saturation in the output so that it does fall\nwithin legal limits.  Pixels that are already OK just go unmodified into the output.\n\nInput  is  from  the  file named input.  If input is -, input is from Standard Input.  If you\ndon't specify input, input is from Standard Input.\n\nOutput is always to Standard Output.\n\nThis program handles multi-image PPM input, producing multi-image PPM output.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--pal  Use the PAL transform instead of the default NTSC.\n",
            "subsections": [
                {
                    "name": "--verbose",
                    "content": "Print a grand total of the number of illegal pixels.\n",
                    "long": "--verbose"
                },
                {
                    "name": "--debug",
                    "content": "Produce a humongous listing of illegal colors and  their  legal  counterparts.   NOTE:\nThis option may produce a great deal of output.\n",
                    "long": "--debug"
                },
                {
                    "name": "--legalonly",
                    "content": "Output  only  pixels that are already legal.  Output black in place of pixels that are\nnot.\n",
                    "long": "--legalonly"
                },
                {
                    "name": "--illegalonly",
                    "content": "Output only pixels that are illegal (and output them uncorrected).   Output  black  in\nplace of pixels that are already legal.\n",
                    "long": "--illegalonly"
                },
                {
                    "name": "--correctedonly",
                    "content": "Output  only  pixels  that  are corrected versions of illegal pixels.  Output black in\nplace of pixels that are already legal.\n\n",
                    "long": "--correctedonly"
                }
            ]
        },
        "SEE ALSO": {
            "content": "ppm(5), ppmdepth(1), ppmdim(1), ppmbrighten(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Wes Barris, Minnesota Supercomputer Center, Inc., Bryan Henderson\n\n\n\n4th Berkeley Distribution                  April 19, 2000                                 PPMNTSC(1)",
            "subsections": []
        }
    },
    "summary": "ppmntsc - make a portable pixmap look like taken from an American TV",
    "flags": [
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "Print a grand total of the number of illegal pixels."
        },
        {
            "flag": "",
            "long": "--debug",
            "arg": null,
            "description": "Produce a humongous listing of illegal colors and their legal counterparts. NOTE: This option may produce a great deal of output."
        },
        {
            "flag": "",
            "long": "--legalonly",
            "arg": null,
            "description": "Output only pixels that are already legal. Output black in place of pixels that are not."
        },
        {
            "flag": "",
            "long": "--illegalonly",
            "arg": null,
            "description": "Output only pixels that are illegal (and output them uncorrected). Output black in place of pixels that are already legal."
        },
        {
            "flag": "",
            "long": "--correctedonly",
            "arg": null,
            "description": "Output only pixels that are corrected versions of illegal pixels. Output black in place of pixels that are already legal."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "ppm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/5/json"
        },
        {
            "name": "ppmdepth",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmdepth/1/json"
        },
        {
            "name": "ppmdim",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmdim/1/json"
        },
        {
            "name": "ppmbrighten",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmbrighten/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Make the RGB colors in a PPM image compatible with NTSC or PAL color systems.",
        "examples": [
            {
                "description": "Make the RGB colors in a PPM image compatible with NTSC color systems",
                "command": "ppmntsc {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}"
            },
            {
                "description": "Make the RGB colors in a PPM image compatible with PAL color systems",
                "command": "ppmntsc --pal {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}"
            },
            {
                "description": "Print the number of illegal pixels in the input image to `stderr`",
                "command": "ppmntsc {{--verb|--verbose}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}"
            },
            {
                "description": "Output only legal/illegal/corrected pixels, set other pixels to black",
                "command": "ppmntsc --{{legalonly|illegalonly|correctedonly}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}"
            }
        ]
    }
}