Skip to documentation
DocumentationAll documentsEnglish

BW-PS(1)

NAME

bw-ps - convert a black and white bw file to PostScript

On this page

SYNOPSIS

bw-ps [-e] [-c] [-L] [-s _input_squaresize_] [-w _input_width_] [-n _input_height_] [-S _inches_square_] [-W _inches_width_] [-N _inches_height_] [_file.bw_] > _file.ps_

DESCRIPTION

bw-ps reads a black and white bw(5) format image and writes an 8-bit grayscale PostScript rendition to standard output. If no input file is given, standard input is read. The input is assumed to be 512x512 pixels unless overridden, and the output image is 6.75x6.75 inches by default, positioned at the lower-left of an 8.5x11 inch page.

OPTIONS

-e

Emit Encapsulated PostScript (EPSF) sized in pixels to the input dimensions, suitable for embedding in another document. The -c and -L page-layout options have no effect in this mode.

-c

Center the output image on the 8.5x11 inch page.

-L

Select landscape mode, rotating the output ninety degrees.

-s input_squaresize

Set both the input width and height, in pixels (default 512).

-w input_width

Set the input width, in pixels (default 512).

-n input_height

Set the input height (number of scan lines), in pixels (default 512).

-S inches_square

Set both the output width and height, in inches (default 6.75).

-W inches_width

Set the output width, in inches (default 6.75).

-N inches_height

Set the output height, in inches (default 6.75).

EXAMPLES

Example 1. Convert a rendering for printing
rt -o image.pix -s 1024 model.g component.r
pix-bw image.pix > image.bw
bw-ps -s 1024 -c -L image.bw > image.ps

Renders a region with rt(1), reduces the color frame to grayscale with pix-bw(1), then produces a 1024x1024 PostScript page centered in landscape orientation, ready to send to a printer.

Example 2. Generate an embeddable EPS figure
bw-ps -e -w 800 -n 600 plot.bw > plot.eps

Wraps an 800x600 grayscale image as Encapsulated PostScript whose bounding box matches the pixel dimensions, so it can be included as a figure in a LaTeX or word-processing document.

SEE ALSO

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

AUTHOR

BRL-CAD Team

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