ppmntsc
Test CPU's Time Stamp Counter
TLDR
Make the RGB colors in a PPM image compatible with NTSC color systems
Make the RGB colors in a PPM image compatible with PAL color systems
Print the number of illegal pixels in the input image to stderr
Output only legal/illegal/corrected pixels, set other pixels to black
SYNOPSIS
ppmntsc [-whitelevel value] [-blacklevel value] [-brightness value] [-contrast value] [-saturation value] [-tint value] [-sharpness value] [-artifact value] [-subcarrier value] [-field number] [ppmfile]
PARAMETERS
-whitelevel value
Sets the NTSC white level, typically in IRE units (default is 100).
-blacklevel value
Sets the NTSC black level, typically in IRE units (default is 7.5).
-brightness value
Adjusts the image brightness, typically in IRE units (default is 0).
-contrast value
Adjusts the image contrast as a percentage (default is 100).
-saturation value
Adjusts the color saturation as a percentage (default is 100).
-tint value
Adjusts the color tint or hue in degrees (default is 0).
-sharpness value
Controls the simulated image sharpness (default is 0).
-artifact value
Sets the level of simulated color artifacts (default is 1.0, where 0.0 means no artifacts and 1.0 is full). Higher values can increase artifacting.
-subcarrier value
Specifies the NTSC color subcarrier frequency in Hertz (default is 3.579545e6 Hz, or 3.579545 MHz).
-field number
Selects which interlaced field to output. NTSC is an interlaced signal; this option allows choosing either field 0 or field 1 (default is 0).
ppmfile
Optional. The path to the input Portable Pixmap (PPM) image file. If omitted, ppmntsc reads from standard input.
DESCRIPTION
ppmntsc is a command-line utility from the Netpbm image manipulation toolkit that converts a Portable Pixmap (PPM) image into another PPM image, simulating the visual characteristics and common artifacts seen on an NTSC (National Television System Committee) television set. It reads a full-color PPM image from standard input (or a specified file) and writes the modified PPM image to standard output. The primary purpose of ppmntsc is to allow developers and designers to preview how their digital images might appear when displayed on an NTSC analog television, accounting for factors like limited bandwidth, YIQ color encoding, and intercarrier interference, which can lead to color bleeding, fringing, and other artifacts, especially with fine details or high-frequency color transitions. The command offers various options to control aspects like brightness, contrast, saturation, tint, sharpness, and the level of simulated color artifacts, providing granular control over the NTSC emulation. It's a valuable tool for understanding the nuances of analog video display and for optimizing digital content for NTSC compatibility.
CAVEATS
ppmntsc provides a simulation of NTSC television output, but it does not perfectly model all complex analog video phenomena. It primarily focuses on color encoding and decoding artifacts. It outputs only a single field of an interlaced signal, meaning it doesn't fully simulate interlacing effects or generate interlaced output. Users should be aware that the actual display characteristics on different NTSC televisions can vary significantly, and this tool offers an approximation rather than a perfect emulation of every display scenario.
INPUT/OUTPUT
ppmntsc reads a full-color Portable Pixmap (PPM) image from standard input by default, or from a specified file path. It then writes the processed PPM image to standard output. This design makes it highly suitable for piping with other Netpbm tools or other command-line utilities for complex image processing workflows.
NTSC COLOR SIMULATION
The command simulates the conversion of the RGB color space of the input image to the YIQ color space (luminance, in-phase chrominance, quadrature-phase chrominance) used in NTSC broadcasting. It then simulates the subsequent decoding process, which introduces bandwidth limitations and phase issues. These processes lead to characteristic color artifacts, such as color bleeding or fringing, especially noticeable around sharp color transitions or fine details, typical of analog NTSC television display.
HISTORY
ppmntsc is a component of the Netpbm package, a long-standing and widely used suite of graphics file format converters and image manipulation tools. Netpbm originated from Jef Poskanzer's PBMplus package, first released in 1988. Over the decades, Netpbm has been continuously developed and maintained by a community of volunteers. ppmntsc was specifically designed to address the need for simulating NTSC analog television characteristics on digital images, making it a valuable tool for content creators and engineers working with broadcast standards.