.TL
Pamtotga User Manual
.SH 1
pamtotga
.LP
Updated: 21 July 2002
.br
Table Of Contents
.SH 2
NAME
.LP
pamtotga - convert a Netpbm image to a TrueVision Targa file
.SH 2
SYNOPSIS
.LP
\fBpamtotga\fR
[\fB-mono|-cmap|-rgb\fR]
[\fB-norle\fR]
[\fIpamfile\fR]
.LP
All options can be abbreviated to their shortest unique prefix. You
may use two hyphens instead of one to designate an option. You may
use either white space or equals signs between an option name and its
value.
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
.LP
\fBpamtotga\fR reads a PBM, PGM, PPM, or PAM image as input and
produces a TrueVision Targa file as output. The PAM image may be
either a BLACKANDWHITE, GRAYSCALE, RGB, or RGB_ALPHA image.
.LP
To create a TGA image with transparency (i.e. with an alpha mask),
use RGB_ALPHA PAM input. Some Netpbm programs that generate images with
alpha masks generate them in that format. For another way to create
the proper input stream, see \fBpamstack\fR.
.LP
It is unclear that anything except \fBpamtotga\fR knows about TGAs
with transparency. The history behind this feature of \fBpamtotga\fR
is not clear. The format \fBpamtotga\fR produces is simply the same
as an ordinary RGB TGA image except with a 4th plane added for
transparency. The PixelSize field of the TGA header specifies 32 bits
instead of 24 and the raster has an extra byte added to each pixel, at
the tail end. The value of that byte has the same meaning as in a PAM
image with maxval 255.
.SH 2
OPTIONS
.LP
.RS
.IP "\fB-cmap\fR"
Make output Targa file of type 24 bit colormapped. Input must contain no
more than 256 distinct colors.
.IP "\fB-mono\fR"
Make output Targa file of type 8 bit monochrome. Input must be PBM or PGM
or a PAM with BLACKANDWHITE or GRAYSCALE tuple type.
See \fB-cmap\fR.
.LP
You may specify at most one of \fB-mono\fR, \fB-cmap\fR, and
\fB-rgb\fR. If you specify neither, the default image type is the
most highly constrained compatible type is used, where monochrome is
more constrained than colormapped which is in turn more constrained
than unmapped.
.IP "\fB-rgb\fR"
Make output Targa file of type 24 bit unmapped color. See \fB-cmap\fR.
.IP "\fB-norle\fR"
Do not use run-length encoding in the output Targa file.
Run-length encoded files are smaller, but Some Targa readers can't
read run-length encoded files.
.RE
.SH 2
SEE ALSO
.LP
tgatoppm,
pnmquant,
pamstack,
pam
pnm
.SH 2
HISTORY
.LP
.LP
This program was called \fBppmtotga\fR until Netpbm 10.6 (July 2002).
That was always a misnomer, though, because a PPM class program would not be
able to tell the difference between PGM and PPM input (it would all look like
PPM), and thus could not choose the output Targa image type based on the type
of the input. Netpbm 10.6 also added the ability to handle an alpha channel,
so it became a PAM class program.
.LP
In Netpbm 10.15 (April 2003), the program became the first in the
Netpbm package to recognize an alpha channel in a PAM. It recognized
tuple type "RGBA". But when this kind of PAM image was later
added to the PAM specification, it was specified with tuple type
"RGB_ALPHA". So in Netpbm 10-26 (January 2005), \fBpamtotga\fR
changed to recognize "RGB_ALPHA" instead of "RGBA".
.SH 2
AUTHOR
.LP
Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer.
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
NAME
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
SEE ALSO
.IP \(bu
AUTHOR
.LP
|