RASFILTER8TO1(1G) — USER COMMANDS
NAME
rasfilter8to1 − convert an 8-bit deep rasterfile to a 1-bit deep rasterfile
SYNOPSIS
rasfilter8to1 [ −r threshold ] [ −g threshold ] [ −b threshold ] [ −a threshold ]
DESCRIPTION
Rasfilter8to1 reads an 8-bit deep rasterfile from standard input and converts it to a 1-bit deep rasterfile on standard output. The format is Sun standard rasterfile format (see /usr/include/rasterfile.h). This is useful for displaying 8-bit raster images on devices that can only handle monochrome rasterfile images.
OPTIONS
Options can be specified to control thresholding of color values. There can be more than one threshold option set, in which case all threshold options specified must be met.
All options take a threshold value which can range from 0 to 255. Pixels, whose threshold conditions exceed the threshold value are given a value of 0 in the 1-bit rasterfile. Those that don’t are given a value of 1. The default option is −a 128.
−r threshold
The threshold condition is the red component of the pixel value.
−g threshold
The threshold condition is the green component of the pixel value.
−b threshold
The threshold condition is the blue component of the pixel value.
−a threshold
The average of the red, green, and blue components is tested against the threshold value.
EXAMPLE
The command:
tutorial% screendump -f /dev/cgtwo0 | rasfilter8to1 | lpr -Pversatec -v prints a monochromatic representation of the /dev/cgtwo0 frame buffer on the printer named "versatec" using the "v" output filter. (see /etc/printcap).
FILES
/dev/cgtwo0 Default name of the Sun-2 color display frame buffer.
SEE ALSO
lpr(1), rastrepl(1), screendump(1), screenload(1)
pr_dump in Programmer’s Reference Manual for SunWindows
Sun Release 3.2 — Last change: 28 April 1986