Name

gencolor — output a pattern of byte values

Synopsis

gencolor [-r#] [-p -b] [-{sS} squaresize] [-{wW} width] [-{nN} height] [ val1 ... valN ]

DESCRIPTION

gencolor repeats a pattern of up to 8192 8-bit values on its standard output. The values, which range from 0 to 255, are taken either from the command line, or in binary (as stored in a .bw or .pix file) from standard input; if the values are not supplied, a single value of 0, for black, is used. The -r flag can be used to specify the number of times to repeat the given pattern, the default being infinity (unless any other "-" options are used -- see below). This program is useful for producing a given grey value or color. Note that gencolor will refuse to write its output to a window; you must redirect the output to a file.

-p and -b are used to specify pix file and bw file, respectively. -w (or -W) indicates the width; -n (or -N) indicates the height; width and height are set to the same value using -s (or -S). By default, a pix file of size 512x512 is assumed; however, use of -r overrules use of any other "-" options.

EXAMPLE

gencolor -r512 0 255 0 > foo.pix

will output 512 "green" pixels (0 255 0 being used as RGB values).

gencolor -r1 0 255 0 | gencolor -r512 > foo.pix

will do the same as above, using standard input instead of having the values on the command line.

SEE ALSO

brlcad(1), pix(5), bw(5)

AUTHOR

BRL-CAD Team

COPYRIGHT

This software is Copyright (c) 1989-2020 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