1Pamtotga User Manual(0)                                Pamtotga User Manual(0)
2
3
4

NAME

6       pamtotga - convert a Netpbm image to a TrueVision Targa file
7
8

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

42       In  addition  to  the options common to all programs based on libnetpbm
43       (most notably -quiet, see
44        Common Options ⟨index.html#commonoptions⟩ ), pamtotga  recognizes  the
45       following command line options:
46
47
48
49       -cmap  Make  output  Targa  file  use a color map (palette) to make the
50              output smaller.
51
52              Each color in the color map is 3 bytes,  8  bits  each  of  red,
53              green,  and  blue,  unless  the  input  is  black  and  white or
54              grayscale, in which case each color in  the  palette  is  repre‐
55              sented by one byte.
56
57              Input must contain no more than 256 distinct colors and must not
58              contain transparency information.
59
60              (The transparency limitation is not a limitation of the  format,
61              but  of pamtotga.  Implementing a color map that contains trans‐
62              parency information is harder to implement).
63
64
65       -cmap16
66              Same as -cmap, except a color map entry for full color input  is
67              5  bits  each  of  red, green, and blue, stored as two bytes (16
68              bits).
69
70              Restrictions are the same as for -cmap.
71
72              This option was new in Netpbm 10.85 (December 2018).
73
74
75       -mono  Make output Targa file of type 8 bit monochrome.  Input must  be
76              PBM  or PGM or a PAM with BLACKANDWHITE or GRAYSCALE tuple type.
77              See -cmap.
78
79              You may specify at most one of -mono, -cmap, and -rgb.   If  you
80              specify  neither, the default image type is the most highly con‐
81              strained compatible type is used, where monochrome is more  con‐
82              strained than colormapped which is in turn more constrained than
83              unmapped.
84
85
86       -rgb   Make output Targa file of  type  24  bit  unmapped  color.   See
87              -cmap.
88
89
90       -norle Do  not  use run-length encoding in the output Targa file.  Run-
91              length encoded files are smaller, but Some Targa  readers  can't
92              read run-length encoded files.
93
94
95       -name=name
96              This  is  the value for the image ID stated in the header of the
97              TGA output file.  pamtotga truncates it as necessary to meet TGA
98              standards.
99
100              By  default,  pamtotga  uses the input file name argument, up to
101              the first period (or the whole thing if there is no period).  It
102              truncates it as necessary to meet TGA standards.  If you specify
103              (or default to) Standard Input, pamtotga omits the image ID from
104              the TGA header.
105
106
107       -verbose
108              This  causes  pamtotga  to  issues messages about the conversion
109              process.
110
111
112
113
114

SEE ALSO

116       tgatoppm(1), pnmquant(1), pamstack(1), pam(1) pnm(1)
117
118

HISTORY

120       This program was called ppmtotga until Netpbm 10.6 (July  2002).   That
121       was always a misnomer, though, because a PPM class program would not be
122       able to tell the difference between PGM and PPM  input  (it  would  all
123       look  like  PPM), and thus could not choose the output Targa image type
124       based on the type of the input.  Netpbm 10.6 also added the ability  to
125       handle a transparency channel, so it became a PAM class program.
126
127       In  Netpbm  10.15  (April  2003),  the  program became the first in the
128       Netpbm package to recognize a transparency channel in a PAM.  It recog‐
129       nized  tuple  type  "RGBA".   But when this kind of PAM image was later
130       added to the PAM  specification,  it  was  specified  with  tuple  type
131       "RGB_ALPHA".   So  in  Netpbm 10.26 (January 2005), pamtotga changed to
132       recognize "RGB_ALPHA" instead of "RGBA".
133
134

AUTHOR

136       Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer.
137

DOCUMENT SOURCE

139       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
140       source.  The master documentation is at
141
142              http://netpbm.sourceforge.net/doc/pamtotga.html
143
144netpbm documentation           06 November 2018        Pamtotga User Manual(0)
Impressum