Name

bwrect — extract a rectangle from a black and white bw file

Synopsis

bwrect [-s squaresize] [-w width] [-n height] [-S out_squaresize] [-W out_width] [-N out_height] [-x xorig] [-y yorig] [-o out_file.bw] file.bw > [out_file.bw]

DESCRIPTION

bwrect extracts a rectangular region from a black and white bw(5) format file. The default input image size is 512x512. The x,y coordinates of the origin (the default xorig=0, yorig=0 corresponds to the lower left corner) are passed as arguments for -x and -y.

The -w file_width flag specifies the width of each scanline in the input file, in pixels. -W scr_width does the same for the display device.

The -n file_height and -N scr_height flags specify the height in scanlines of the input file and display device respectively.

-s squarefilesize and -S squarescrsize set both the height and width to the size given (for input file and display device respectively).

(scr_width and scr_height must be set to positive values, either separately via -W and -N, or jointly via -S. This is because they start with default values of zero.)

-o out_file.bw is a way of specifying output file name.

This utility supports pipes and can read/write from/to them.

SEE ALSO

brlcad(1), bwcrop(1), bwscale(1), pixrect(1), bw(5)

BUGS

We ought to allow the questions to be answered on the command line so that shell scripts, etc., could use this.

AUTHOR

BRL-CAD Team

COPYRIGHT

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