.\" Copyright (c) 1990, Minnesota Supercomputer Center, Inc.
.TH PGMTORLE 1 "July 20, 1990" 1
.SH NAME
pgmtorle \- convert a pbmplus/pgm image file into an RLE image file.
.SH SYNOPSIS
.B pgmtorle
[
.B \-h
] [
.B \-v
] [
.B \-a
] [
.BI \-o " outfile"
] [
.I filename
]
.SH DESCRIPTION
This program converts PBMPLUS grayscale (pgm) image files into Utah
.IR RLE (5)
image files.  PBMPLUS/pgm image files contain the image dimensions and 8-bit
pixels with no matte or alpha data.  When converting to an RLE file, the alpha
channel may optionally be computed.  The RLE file will contain a "grayscale"
image (8 bits) with no colormap.  The origins of PBMPLUS and Utah RLE files
are in the upper left and lower left corners respectively.  Therefore, it is
common practice to send the output of this program through the "rleflip"
utility -- see examples below.  These RLE files may then be viewed using any
RLE image viewer.
.PP
.SH OPTIONS
.TP
.B \-v
This option will cause pgmtorle to operate in verbose mode.  The header
information is written to "stderr".  Actually, there is not much header
information stored in a PBMPLUS file so this information is minimal.
.TP
.B \-h
This option allows the header of the PBMPLUS image to be dumped to "stderr"
without converting the file.  It is equivalent to using the \-v option except
that no file conversion takes place.
.TP
.B \-a
This option will cause pgmtorle to use the grayscale data to compute an alpha
channel in the resulting RLE file.  For any non-zero grayscale data, the alpha
channel will contain a value of 255.  The resulting RLE image file will
contain one color channel and one alpha channel.
.TP
.BI \-o " outfile"
If specified, the output will be written to this file.  If 
.I outfile
is "\-", or if it is not specified, the output will be written to the
standard output stream.
.TP
.I infile.pgm
The name of the PBMPLUS image data file to be converted.  This file must end
in ".pgm".  However, it is not necessary to supply the ".pgm" extension as it
will be added to the supplied name if not already there.
.SH EXAMPLES
.TP
pgmtorle \-v test.pgm \-o test.rle
While running in verbose mode, convert test.pgm to RLE format and store
resulting data in test.rle.
.TP
pgmtorle test | rleflip \-v >test.rle
Convert test.pgm to RLE format and flip its contents so that it may be
correctly displayed.
.TP
pgmtorle \-h test
Dump the header information of the PBMPLUS file called test.pgm.
.SH SEE ALSO
.IR ppmtorle (1),
.IR rletoppm (1),
.IR urt (1),
.IR RLE (5).
.SH AUTHOR
.br
Wesley C. Barris
.br
Army High Performance Computing Research Center (AHPCRC)
.br
Minnesota Supercomputer Center, Inc.
