| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamtotga User Manual" 1 "06 November 2018" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pamtotga - convert a Netpbm image to a TrueVision Targa file |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpamtotga\fP |
| 15 |
[\fB-mono|-cmap|-cmap16|-rgb\fP] |
| 16 |
[\fB-norle\fP] |
| 17 |
[\fB-name=\fP\fIname\fP |
| 18 |
[\fB-verhose\fP] |
| 19 |
[\fIpamfile\fP] |
| 20 |
.PP |
| 21 |
All options can be abbreviated to their shortest unique prefix. You |
| 22 |
may use two hyphens instead of one to designate an option. You may |
| 23 |
use either white space or equals signs between an option name and its |
| 24 |
value. |
| 25 |
|
| 26 |
.UN description |
| 27 |
.SH DESCRIPTION |
| 28 |
.PP |
| 29 |
This program is part of |
| 30 |
.BR "Netpbm" (1)\c |
| 31 |
\&. |
| 32 |
.PP |
| 33 |
\fBpamtotga\fP reads a PBM, PGM, PPM, or PAM image as input and |
| 34 |
produces a TrueVision Targa file as output. The PAM image may be |
| 35 |
either a BLACKANDWHITE, GRAYSCALE, RGB, or RGB_ALPHA image. |
| 36 |
.PP |
| 37 |
To create a TGA image with transparency (i.e. with a transparency mask), |
| 38 |
use RGB_ALPHA PAM input. Some Netpbm programs that generate images with |
| 39 |
transparency masks generate them in that format. For another way to create |
| 40 |
the proper input stream, see |
| 41 |
.BR "\fBpamstack\fP" (1)\c |
| 42 |
\&. |
| 43 |
.PP |
| 44 |
It is unclear that anything except \fBpamtotga\fP knows about TGAs |
| 45 |
with transparency. The history behind this feature of \fBpamtotga\fP |
| 46 |
is not clear. The format \fBpamtotga\fP produces is simply the same |
| 47 |
as an ordinary RGB TGA image except with a 4th plane added for |
| 48 |
transparency. The PixelSize field of the TGA header specifies 32 bits |
| 49 |
instead of 24 and the raster has an extra byte added to each pixel, at |
| 50 |
the tail end. The value of that byte has the same meaning as in a PAM |
| 51 |
image with maxval 255. |
| 52 |
|
| 53 |
.UN options |
| 54 |
.SH OPTIONS |
| 55 |
.PP |
| 56 |
In addition to the options common to all programs based on libnetpbm |
| 57 |
(most notably \fB-quiet\fP, see |
| 58 |
.UR index.html#commonoptions |
| 59 |
Common Options |
| 60 |
.UE |
| 61 |
\&), \fBpamtotga\fP recognizes the following |
| 62 |
command line options: |
| 63 |
|
| 64 |
|
| 65 |
.TP |
| 66 |
\fB-cmap\fP |
| 67 |
Make output Targa file use a color map (palette) to make the output smaller. |
| 68 |
.sp |
| 69 |
Each color in the color map is 3 bytes, 8 bits each of red, green, and blue, |
| 70 |
unless the input is black and white or grayscale, in which case each color in |
| 71 |
the palette is represented by one byte. |
| 72 |
.sp |
| 73 |
Input must contain no more than 256 distinct colors and must not contain |
| 74 |
transparency information. |
| 75 |
.sp |
| 76 |
(The transparency limitation is not a limitation of the format, but |
| 77 |
of \fBpamtotga\fP. Implementing a color map that contains transparency |
| 78 |
information is harder to implement). |
| 79 |
|
| 80 |
.TP |
| 81 |
\fB-cmap16\fP |
| 82 |
Same as \fB-cmap\fP, except a color map entry for full color input is 5 |
| 83 |
bits each of red, green, and blue, stored as two bytes (16 bits). |
| 84 |
.sp |
| 85 |
Restrictions are the same as for \fB-cmap\fP. |
| 86 |
.sp |
| 87 |
This option was new in Netpbm 10.85 (December 2018). |
| 88 |
|
| 89 |
.TP |
| 90 |
\fB-mono\fP |
| 91 |
Make output Targa file of type 8 bit monochrome. Input must be PBM or PGM |
| 92 |
or a PAM with BLACKANDWHITE or GRAYSCALE tuple type. |
| 93 |
See \fB-cmap\fP. |
| 94 |
.sp |
| 95 |
You may specify at most one of \fB-mono\fP, \fB-cmap\fP, and |
| 96 |
\fB-rgb\fP. If you specify neither, the default image type is the |
| 97 |
most highly constrained compatible type is used, where monochrome is |
| 98 |
more constrained than colormapped which is in turn more constrained |
| 99 |
than unmapped. |
| 100 |
|
| 101 |
.TP |
| 102 |
\fB-rgb\fP |
| 103 |
Make output Targa file of type 24 bit unmapped color. See \fB-cmap\fP. |
| 104 |
|
| 105 |
.TP |
| 106 |
\fB-norle\fP |
| 107 |
Do not use run-length encoding in the output Targa file. |
| 108 |
Run-length encoded files are smaller, but Some Targa readers can't |
| 109 |
read run-length encoded files. |
| 110 |
|
| 111 |
.TP |
| 112 |
\fB-name=\fP\fIname\fP |
| 113 |
This is the value for the image ID stated in the header of the TGA |
| 114 |
output file. \fBpamtotga\fP truncates it as necessary to meet TGA |
| 115 |
standards. |
| 116 |
.sp |
| 117 |
By default, \fBpamtotga\fP uses the input file name argument, up to |
| 118 |
the first period (or the whole thing if there is no period). It truncates |
| 119 |
it as necessary to meet TGA standards. If you specify (or default to) |
| 120 |
Standard Input, \fBpamtotga\fP omits the image ID from the TGA header. |
| 121 |
|
| 122 |
.TP |
| 123 |
\fB-verbose\fP |
| 124 |
This causes \fBpamtotga\fP to issues messages about the conversion |
| 125 |
process. |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
.UN seealso |
| 131 |
.SH SEE ALSO |
| 132 |
.BR "tgatoppm" (1)\c |
| 133 |
\&, |
| 134 |
.BR "pnmquant" (1)\c |
| 135 |
\&, |
| 136 |
.BR "pamstack" (1)\c |
| 137 |
\&, |
| 138 |
.BR "pam" (1)\c |
| 139 |
\& |
| 140 |
.BR "pnm" (1)\c |
| 141 |
\& |
| 142 |
|
| 143 |
.UN history |
| 144 |
.SH HISTORY |
| 145 |
.PP |
| 146 |
This program was called \fBppmtotga\fP until Netpbm 10.6 (July 2002). |
| 147 |
That was always a misnomer, though, because a PPM class program would not be |
| 148 |
able to tell the difference between PGM and PPM input (it would all look like |
| 149 |
PPM), and thus could not choose the output Targa image type based on the type |
| 150 |
of the input. Netpbm 10.6 also added the ability to handle a transparency |
| 151 |
channel, so it became a PAM class program. |
| 152 |
.PP |
| 153 |
In Netpbm 10.15 (April 2003), the program became the first in the |
| 154 |
Netpbm package to recognize a transparency channel in a PAM. It recognized |
| 155 |
tuple type "RGBA". But when this kind of PAM image was later |
| 156 |
added to the PAM specification, it was specified with tuple type |
| 157 |
"RGB_ALPHA". So in Netpbm 10.26 (January 2005), \fBpamtotga\fP |
| 158 |
changed to recognize "RGB_ALPHA" instead of "RGBA". |
| 159 |
|
| 160 |
.UN author |
| 161 |
.SH AUTHOR |
| 162 |
|
| 163 |
Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer. |
| 164 |
.SH DOCUMENT SOURCE |
| 165 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 166 |
source. The master documentation is at |
| 167 |
.IP |
| 168 |
.B http://netpbm.sourceforge.net/doc/pamtotga.html |
| 169 |
.PP |