gandalf@csli.STANFORD.EDU (Juergen Wagner) (07/11/88)
A bitmap conversion program is available via anonymous ftp from csli.stanford.edu (36.9.0.46). There are three shar files named bm.[123]of3, each of about 40kBytes. Please, don't tell me that there are lots of other programs doing the same job, and of course much better :-). Whoever needs a program converting bitmaps between the following formats, can pull it from csli. For people who can't ftp from Internet sites, I am going to submit it to comp.sources.unix after doing some cleanup. This may take a week or two because I am busy with lots of other things, too. Please, send bug reports, comments, etc. to gandalf@csli.stanford.edu (UUCP-style: backbone!csli.stanford.edu!gandalf). Flames to /dev/null. Enjoy, -- Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA
gandalf@csli.STANFORD.EDU (Juergen Wagner) (07/11/88)
Argh! I forgot to list the features:
NAME
bm - convert bitmaps between formats
SYNOPSIS
bm [-fmt] [ops] [file] [options] > newfile
bm -help
DESCRIPTION
Bm provides a flexible tool to convert bitmaps between dif-
ferent formats. A few unary operations are also available.
For more complex bitmap operations, please use the program
'bmop' which also comes with this package. Whereas 'bm'
mostly serves as a conversion program, 'bmop' allows to
manipulate bitmaps in various ways.
Examples:
bm -ri mask.r > mask.icon
converts a Sun rasterfile 'mask.r' to a Sun Iconedit
file 'mask.icon'.
bm -rp mask.r same | lpr -Plw
prints a Sun raster file 'mask.r' on a PostScript
printer lw, keeping the proportions of the image.
bm -rp mask.r | lpr -Plw
does the same thing but extends the image over the
whole page.
bm -rp +invert - | lpr -Plw
reads a Sun rasterfile form standard input, inverts the
image, and prints it on the PostScript printer lw,
extending the image over the whole page.
`bm' takes a format description consisting of two charac-
ters, which describes the source and target format. Conver-
sion also pads the bitmap to width and height becoming mul-
tiples of 16. In addition to the format specification, a
number of operators can be specified. These operators will
be applied to the bitmap after it has been read in, and
before it is output again. Input is taken from a file (stan-
dard input is denoted by '-'), output is written to standard
output.
FORMATS
Formats suitable for both, input and output:
1 (ASCII)
a bitmap of zeroes and ones, quite flexible.
a (ASCII)
a bitmap of blanks and non-blanks.
g (gandalf)
Gandalf's favourite bitmap format.
i (Iconedit)
a bitmap in Sun iconedit format.
p (PostScript)
a PostScript file. For input, only PostScript files of
a special format are recognized. On output, options are
"same" (keep ratio of width to height), "half" (shrink
by factor two), "quart" (shrink by factor four). The
default is to resize the bitmap such that it exactly
fits the output page.
r (Rasterfile)
a Sun rasterfile (RT_STANDARD).
x (Xerox)
a bitmap in XEROX 1108 format.
X (X Window)
a bitmap in X10 or X11 format. On output, options
"x10", "x11", and "swap" are available.
Formats suitable for input only:
m (MacPaint)
a MacPaint document.
u (Weird ucbvax format)
The format of those bitmaps retrievable from ucbvax via
anonymous ftp. They are located in the directory
pub/xbackgrounds.
w (Xwd format)
Xwd window dumper format is not supported yet.
Formats suitable for output only:
s (LN03)
DEC Sixel format.
h (HP LaserJet)
a HP LaserJet file. Options specify the resolution: one
of 75, 150, 300.
l (Imagen)
an imPRESS format file suitable for Imagen printers.
P (Printronix)
a file suitable for Printronix printers.
OPERATORS
+invert
Invert image.
+frame
Add a black frame to the image.
+swap
Swaps the bytes (word-wise).
AUTHOR
Juergen Wagner (gandalf@csli.stanford.edu), Center for the
Study of Language and Information (CSLI), Stanford Univer-
sity (formerly at Fraunhofer-Institut fuer Arbeitswirtschaft
und Organisation, Stuttgart).
I hope this sheds some light on what the program is supposed to do.
The xwd format is not included in the current version - I am still
working on it. I am also willing to extend the program by adding
other formats (please give a description).
--
Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu
Center for the Study of Language and Information (CSLI), Stanford CA