biff2ps
[ XITE Reference Manual | XITE home ]
Contents
Name
biff2ps - convert BIFF image to PostScript
biff2ps [<option>...] <inputfile> <outputfile>
Use "-" or "-0" for inputfile to get stdin. Use "-" or "-1"
for outputfile to get stdout. Options -i and -o take
precedence over inputfile and outputfile respectively.
Convert an image to PostScript code.
The PostScript file must be printed on a PostScript
printer. Color printers need color images. In this case,
give a three band input image, and use the -rgb option.
The resulting code can be used to include images in e. g.
a LaTeX document with the filter dvips.
Default size (-m 1.0) is 72 pixels per inch if image is
"small". If image is "large", then fill the page vertically
or horizontally. Default position is to center image
vertically and horizontally.
Some of the options accept text which is literal PostScript
code. Certain predefined PostScript macros can be used in
this case. Which options accept this, is mentioned in the
description of each option.
-
Predefined PostScript macros
- 1 pt equals 1/72 inch.
-
xsize
- Width of image in pt.
-
ysixe
- Height of image in pt.
-
xboxsize
- Width of box which contains the image (or all the images) on
the page, in pt.
-
yboxsize
- Height of box which contains the image (or all the images) on
the page, in pt.
-
hfontsize
- Header font size.
-
ffontsize
- Footnote font size.
-
xcenter
- Center of text.
-
The options are
-
-
-c int
- Number of gray levels (2, 4, 8, 16 or 256), default: 256.
-
-m float
- Magnify image with factor float.
-
-w float
- Set image width to float cm.
-
-h float
- Set image height to float cm.
-
-x float
- Set left marg to float cm.
-
-y float
- Set bottom marg to float cm.
-
-i filename
- Set input filename. Overrides inputfile.
-
-o filename
- Set output filename. Overrides outputfile.
-
-q pos
-
Print image in cell given by pos.
Imagine that the paper is a matrix consisting of one or more
columns and one or more rows. pos determines the matrix
dimensions and in which cell (matrix element) the image will
be printed.
pos must be an 8-character string consisting of 4 parts,
each part consisting of 2 characters. The first character (of
the two in a part) must be either h (for height or vertical
matrix dimension), w (for width or horizontal matrix
dimension), x (for horizontal cell number or matrix
coordinate) or y (for vertical cell number or matrix
coordinate). The second character (of the two in a part) must
be a single digit. Coordinates start with zero.
The default value of pos is "h1w1x0y0". This means that the
paper is considered as a single cell and that the image will
be printed in this cell.
With pos equal to "h1w2x1y0", the paper is considered to
consist of two horizontally adjacent cells. The image will be
printed in the rightmost cell.
Several images can be printed on the same page, each image
positioned relative to the others with this option. See
the section Examples below.
-
-p
- Don't print prolog.
-
-t
- Don't print trailer.
-
-ht text
- Set header to text. It is printed with the PostScript code
(<ht>) <hx> <hy> moveto show.
-
-hs text
- Set header font-size. Accepts predefined PostScript macros or
numerical value (number of points (1/72 inch)). Default: 25.
-
-hy text
- Set vertical position for header. Accepts predefined
PostScript macros or numerical value (number of points (1/72
inch)). Default: "ysize 10 add".
-
-hx text
- Set horizontal position for header. Accepts predefined
PostScript macros or numerical value (number of points (1/72
inch)). Default: "xcenter".
-
-ft text
- Set footnote to text. It is printed with the PostScript code
(<ft>) <fx> <fy> moveto show.
-
-fs text
- Set footnote font-size. Accepts predefined PostScript macros or
numerical value (number of points (1/72 inch)). Default: 15.
-
-fy text
- Set vertical position for footnote. Accepts predefined
PostScript macros or numerical value (number of points (1/72
inch)). Default: "-10 ffontsize sub".
-
-fx text
- Set horizontal position for footnote. Accepts predefined
PostScript macros or numerical value (number of points (1/72
inch)). Default: "xcenter".
-
-bg int
- Set background pixel value to int. This colors the whole
page except for the image itself. Note that it does not
change pixels in the image itself and has nothing to do with
what is considered as foreground/object and background in
the BIFF image.
This option is of limited value and should NOT be used
if the PostScript code is to be included in another document.
-
-rgb
- Interpret three bands as rgb.
-
-copies n
- Print n copies.
pseudo2rgb(1)
Most black-and-white printers will not accept color
PostScript code.
Otto Milvang, Tor Lønnestad and Svein Bøe, BLAB, Ifi, UiO
-
black-and-white image with default size and position
biff2ps mona.img mona.ps
-
black-and-white image with specified size (in cm)
biff2ps -w 5.0 -h 7.0 mona.img mona.ps
-
black-and-white image with half of default size
- biff2ps -m 0.5 mona.img mona.ps
-
Color coding with default size and position
- biff2ps -rgb monargb.img monargb.ps
Set up 4 images on one page with 1 title and 4 subtitles
(biff2ps img1 - -m 0.5 -q w2h2x0y0 -ft "Pos 0 0" -t;\\
biff2ps img2 - -m 0.5 -q w2h2x1y0 -ft "Pos 1 0" -p -t;\\
biff2ps img3 - -m 0.5 -q w2h2x1y1 -ft "Pos 1 1" -p -t;\\
biff2ps img4 - -m 0.5 -q w2h2x0y1 -ft "Pos 0 1" -p \\
-ht "IMAGE" -hx "xcenter xboxsize 2 div add" \\
-hy "ysize 25 add") > img.ps
The above command is legal in the UNIX shells csh and tcsh.
The ";" means that the commands are executed sequentially. The
enclosing parentheses mean that the four commands are
considered as one. The ">" means to send the output from the
complete command to a file. The options -t and -p are used
to ensure that the PostScript prolog and trailer each occurs
only once in the resulting output.
$Id: biff2ps.c,v 1.48 1997/01/09 16:32:16 svein Exp $