decimate nbytes/pixel width height [outwidth outheight]
DECIMATE(1)
NAME
decimate - reduce the resolution of an image or data file
On this page
SYNOPSIS
DESCRIPTION
decimate reads a file of width by height data items from standard input, and discards enough data to produce an output file of outwidth by outheight items on standard output. The size of each data item is specified by nbytes/pixel. If outwidth and outheight are not provided, both default to 512.
If the input image size is not an integer multiple of the output image size, the result is padded with zero elements (pixels) on the right and top to achieve an output image of exactly the specified size.
To process a bw(5) format file, use a value of 1 for nbytes/pixel. To process a pix(5) format file, use a value of 3.
EXAMPLES
$ decimate 3 1024 1024 512 512 < input.pix | pix-fb -w 512 -n 512
Reduce a 1024x1024 pix(5) image (3 bytes/pixel) to 512x512 by discarding every other sample and scanline, piping the result straight to pix-fb(1) for a quick preview of an image too large for the framebuffer.
SEE ALSO
brlcad(1), pix-fb(1), bw(5), pix(5)
AUTHOR
BRL-CAD Team
COPYRIGHT
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org