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