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

NAME

6       ppmtopcx - convert a PPM image to a PCX file
7
8

SYNOPSIS

10       ppmtopcx
11
12       [-24bit]
13
14       [-8bit]
15
16       [-packed]
17
18       [-stdpalette]
19
20       [-palette=palettefile]
21
22       [-planes=planes]
23
24       [-xpos=cols]
25
26       [-ypos=rows]
27
28       [ppmfile]
29
30

DESCRIPTION

32       This program is part of Netpbm(1).
33
34       ppmtopcx  reads a PPM image as input and produces a PCX file as output.
35       The type of the PCX file depends on the number of colors in  the  input
36       image:
37
38
39
40       16 colors or fewer:
41              1 bit/pixel, 1-4 planes, colormap in header
42
43
44       more than 16 colors, but no more than 256:
45              8 bits/pixel, 1 plane, colormap at the end of the file.
46
47
48       More than 256 colors:
49              24bit truecolor file (8 bits/pixel, 3 planes).
50
51
52
53       You can override some of that and explicitly choose the format with the
54       options below.
55
56

OPTIONS

58       In addition to the options common to all programs  based  on  libnetpbm
59       (most notably -quiet, see
60        Common  Options  ⟨index.html#commonoptions⟩ ), ppmtopcx recognizes the
61       following command line options:
62
63
64
65       -24bit Produce a 24bit truecolor PCX file, even if the  image  has  256
66              colors or fewer.
67
68
69       -8bit  Produce  an 8bit (256 colors) PCX file, even if the image has 16
70              colors or fewer.
71
72              This option was added in Netpbm 10.18 (August 2003).
73
74
75       -packed
76              Use "packed pixel" format for files with 16 colors or fewer:  1,
77              2, or 4 bits/pixel, 1 plane.
78
79
80       -stdpalette
81              Instead of computing a palette from the colors in the image, use
82              a standard, built-in 16 color palette.  If the image contains  a
83              color that is not in the standard palette, ppmtopcx fails.
84
85              The standard palette is not only a set of colors, but a specific
86              mapping of palette indexes to colors.  E.g. red is 4.
87
88              You can use pnmremap with a suitable PPM image of  the  standard
89              palette  to  adapt your image to use exactly those colors in the
90              palette so that ppmtopcx -stdpalette will work on it.
91
92              The file pcxstd.ppm, part of Netpbm, contains the standard  pal‐
93              ette.
94
95              Although  the  PCX  header tells exactly what palette is used in
96              the file, some older PCX interpreters do not use  that  informa‐
97              tion.   They  instead assume the standard palette.  If you don't
98              use the -stdpalette option, ppmtopcx,  ppmtopcx  may  create  an
99              image that uses a different palette (a rearrangement of the same
100              colors) and then one of these older interpreters would interpret
101              the colors in the image wrong.
102
103              You cannot specify this option along with -palette.
104
105              This option was new in Netpbm 10.22 (April 2004).
106
107
108       -palette=palettefile
109              Instead  of  computing the palette from the colors in the image,
110              use the palette from the file palettefile.  If the palette  con‐
111              tains a color that is not in that palette, ppmtopcx fails.
112
113              The palette file must be a PPM image that contains one pixel for
114              each color in the palette.  It doesn't matter  what  the  aspect
115              ratio  of  the palette image is.  The order of the colors in the
116              PCX palette is the order of the pixels in the PPM image in stan‐
117              dard  western  reading order (left to right, top to bottom).  If
118              there is a duplicate color  in  the  palette,  ppmtopcx  chooses
119              between them arbitrarily in building the PCX raster.
120
121              You  would  need  this  only if you have a PCX reader that can't
122              read the palette that is in the PCX  file  and  instead  assumes
123              some particular palette.  See also the -stdpalette option.
124
125              If  your  input  image  might contain colors other than those in
126              your palette, you can convert the input image to one  that  con‐
127              tains only those colors in your palette with pnmremap.
128
129              You cannot specify this along with -stdpalette.
130
131              This option was new in Netpbhm 10.25 (October 2004).
132
133
134       -planes=planes
135              Generate  a  PCX file with planes planes, even though the number
136              of colors in the image could  be  represented  in  fewer.   This
137              makes  the file larger, but some PCX interpreters are capable of
138              processing only certain numbers of planes.
139
140              This is meaningful only when ppmtopcx generates an image in  the
141              16  color  palette  format without packed pixels.  Consequently,
142              you cannot specify this option together with -24bit or -8bit  or
143              -packed.
144
145              The  valid  values  for  planes are 1, 2, 3, and 4.  By default,
146              ppmtopcx chooses the smallest number of planes that  can  repre‐
147              sent  the colors in the image.  E.g. if there are 5 colors, ppm‐
148              topcx chooses 3 planes.
149
150              This option was new in Netpbm 10.21 (March 2004).
151
152
153       -xpos=cols
154
155
156       -ypos=rows
157               These options set the position of the image in some field (e.g.
158              on  a  screen) in columns to the right of the left edge and rows
159              below the top edge.  The  PCX  format  contains  image  position
160              information.  Don't confuse this with the position of an area of
161              interest within the image.  For example, using pnmpad to  add  a
162              10  pixel left border to an image and then converting that image
163              to PCX with xpos = 0 is not the same as converting the  original
164              image to PCX and setting xpos = 10.
165
166              The values may be from -32767 to 32768.
167
168              The default for each is zero.
169
170
171
172

SEE ALSO

174       pcxtoppm(1), ppm(1)
175
176

AUTHORS

178       Copyright  (C)  1994  by Ingo Wilken (Ingo.Wilken@informatik.uni-olden‐
179       burg.de)
180
181       Based on previous work by Michael Davidson.
182

DOCUMENT SOURCE

184       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
185       source.  The master documentation is at
186
187              http://netpbm.sourceforge.net/doc/ppmtopcx.html
188
189netpbm documentation           26 September 2020       Ppmtopcx User Manual(0)
Impressum