pixbgstrip — strip smooth shaded background from a pix(5) file
pixbgstrip [-a] [-t
pixbgstrip reads a pix(5) format file from the named file, or from standard input if no file is specified. For each scanline read, all pixels that match the color of the background pixel are converted to black (0/0/0), and then the new scanline is written on stdout.
The default X offset for the background pixel is zero (i.e.
), but if the pixel at X offset zero is not the desired background
(for example, if a border exists around the actual image), then
another offset can be specified.
By default, a pixel will be replaced with black only if it exactly
matches the value of the background pixel
(i.e., the matching threshold is zero;
However, if the background is slightly noisy, it may be necessary to
perform a slightly looser matching. The threshold variable
specifies how large a difference between an input pixel and the background
pixel will still result in black being output.
By default, the
file is assumed to be 512x512 pixels.
flag causes the program to attempt to autosize.
A table of common image sizes is consulted, and if any match
the size of the input file, then the width and height values
associated with that size will be used.
flag specifies the width of each scanline in the input file, in pixels.
flag specifies the height in scanlines of the input file.
sets both the height and width to the size given.
This software is Copyright (c) 1991-2016 by the United States Government as represented by U.S. Army Research Laboratory.