1Pamtotga User Manual(0) Pamtotga User Manual(0)
2
3
4
6 pamtotga - convert a Netpbm image to a TrueVision Targa file
7
8
10 pamtotga [-mono|-cmap|-cmap16|-rgb] [-norle] [-name=name [-verhose]
11 [pamfile]
12
13 All options can be abbreviated to their shortest unique prefix. You
14 may use two hyphens instead of one to designate an option. You may use
15 either white space or equals signs between an option name and its
16 value.
17
18
20 This program is part of Netpbm(1).
21
22 pamtotga reads a PBM, PGM, PPM, or PAM image as input and produces a
23 TrueVision Targa file as output. The PAM image may be either a
24 BLACKANDWHITE, GRAYSCALE, RGB, or RGB_ALPHA image.
25
26 To create a TGA image with transparency (i.e. with a transparency
27 mask), use RGB_ALPHA PAM input. Some Netpbm programs that generate
28 images with transparency masks generate them in that format. For
29 another way to create the proper input stream, see pamstack(1).
30
31 It is unclear that anything except pamtotga knows about TGAs with
32 transparency. The history behind this feature of pamtotga is not
33 clear. The format pamtotga produces is simply the same as an ordinary
34 RGB TGA image except with a 4th plane added for transparency. The Pix‐
35 elSize field of the TGA header specifies 32 bits instead of 24 and the
36 raster has an extra byte added to each pixel, at the tail end. The
37 value of that byte has the same meaning as in a PAM image with maxval
38 255.
39
40
42 -cmap Make output Targa file use a color map (palette) to make the
43 output smaller.
44
45 Each color in the color map is 3 bytes, 8 bits each of red,
46 green, and blue, unless the input is black and white or
47 grayscale, in which case each color in the palette is repre‐
48 sented by one byte.
49
50 Input must contain no more than 256 distinct colors and must not
51 contain transparency information.
52
53 (The transparency limitation is not a limitation of the format,
54 but of pamtotga. Implementing a color map that contains trans‐
55 parency information is harder to implement).
56
57
58 -cmap16
59 Same as -cmap, except a color map entry for full color input is
60 5 bits each of red, green, and blue, stored as two bytes (16
61 bits).
62
63 Restrictions are the same as for -cmap.
64
65 This option was new in Netpbm 10.85 (December 2018).
66
67
68 -mono Make output Targa file of type 8 bit monochrome. Input must be
69 PBM or PGM or a PAM with BLACKANDWHITE or GRAYSCALE tuple type.
70 See -cmap.
71
72 You may specify at most one of -mono, -cmap, and -rgb. If you
73 specify neither, the default image type is the most highly con‐
74 strained compatible type is used, where monochrome is more con‐
75 strained than colormapped which is in turn more constrained than
76 unmapped.
77
78
79 -rgb Make output Targa file of type 24 bit unmapped color. See
80 -cmap.
81
82
83 -norle Do not use run-length encoding in the output Targa file. Run-
84 length encoded files are smaller, but Some Targa readers can't
85 read run-length encoded files.
86
87
88 -name=name
89 This is the value for the image ID stated in the header of the
90 TGA output file. pamtotga truncates it as necessary to meet TGA
91 standards.
92
93 By default, pamtotga uses the input file name argument, up to
94 the first period (or the whole thing if there is no period). It
95 truncates it as necessary to meet TGA standards. If you specify
96 (or default to) Standard Input, pamtotga omits the image ID from
97 the TGA header.
98
99
100 -verbose
101 This causes pamtotga to issues messages about the conversion
102 process.
103
104
105
106
107
109 tgatoppm(1), pnmquant(1), pamstack(1), pam(1) pnm(1)
110
111
113 This program was called ppmtotga until Netpbm 10.6 (July 2002). That
114 was always a misnomer, though, because a PPM class program would not be
115 able to tell the difference between PGM and PPM input (it would all
116 look like PPM), and thus could not choose the output Targa image type
117 based on the type of the input. Netpbm 10.6 also added the ability to
118 handle a transparency channel, so it became a PAM class program.
119
120 In Netpbm 10.15 (April 2003), the program became the first in the
121 Netpbm package to recognize a transparency channel in a PAM. It recog‐
122 nized tuple type "RGBA". But when this kind of PAM image was later
123 added to the PAM specification, it was specified with tuple type
124 "RGB_ALPHA". So in Netpbm 10.26 (January 2005), pamtotga changed to
125 recognize "RGB_ALPHA" instead of "RGBA".
126
127
129 Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer.
130
132 This manual page was generated by the Netpbm tool 'makeman' from HTML
133 source. The master documentation is at
134
135 http://netpbm.sourceforge.net/doc/pamtotga.html
136
137netpbm documentation 06 November 2018 Pamtotga User Manual(0)