Name

halftone — Translate a bw file to a halftoned bw file

DESCRIPTION

Halftone reads a bw(5) format file from the named file, or from standard in if no file is specified, and reduces the number of intensity levels from 256 to a default of 2. Halftone tries to preserve as much information as possible by applying dither.

By default, the bw file is assumed to be 512x512 pixels. Specifying the -h flag changes the size to 1024x1024.

If the -R flag is specified random noise is added to the dither which can sometimes improve the results.

The -S flag causes a surpentine raster to be used rather than a left to right scan.

The -a flag is used when automatic file sizing is wanted. This does not work on pipes.

The -w file_width flag specifies the width of each scanline in the input file, in pixels.

The -n file_height flag specifies the height in scanlines of the input file.

-s squarefilesize sets both the height and width to the size given.

-B contrast will define a floating point value to be used as the Beta portion of a edge sharpening algorithm. The default is 0.0, which is no sharpening.

-I Levels defines the number of different intensity levels to use on output. The default is 2 (1 bit) and the max is 256 (8 bits).

The -M method allows a choice of dither methods. The default is 0 a Floyd-Steinberg diffused error dither, 1 is a 45 degree classical clustered halftone screen, 2 is a simple threshold dither, 3 is a 0 degree dispersed halftone screen.

The -T x1 y1 x2 y2 ... parameter is used to define a curve to be used as a tone scale. The resulting curve is used to map input pixels to output pixels. The default curve is -T 0 0 128 128 255 255 a curve suggested by Robert Ulichney in Digital Halftoning is -T 0 0 15 0 128 100 200 200 240 255 255 255.