bwrect — extract a rectangle from a black and white bw file
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
]
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.
We ought to allow the questions to be answered on the command line so that shell scripts, etc., could use this.