Debian Codegraph @

upstream/debian-unstable/man1/ppmtopcx.1

raw
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 "Ppmtopcx User Manual" 1 "26 September 2020" "netpbm documentation"
7
8 .SH NAME
9
10 ppmtopcx - convert a PPM image to a PCX file
11
12 .UN synopsis
13 .SH SYNOPSIS
14
15 \fBppmtopcx\fP
16
17 [\fB-24bit\fP]
18
19 [\fB-8bit\fP]
20
21 [\fB-packed\fP]
22
23 [\fB-stdpalette\fP]
24
25 [\fB-palette=\fP\fIpalettefile\fP]
26
27 [\fB-planes=\fP\fIplanes\fP]
28
29 [\fB-xpos=\fP\fIcols\fP]
30
31 [\fB-ypos=\fP\fIrows\fP]
32
33 [\fIppmfile\fP]
34
35 .UN description
36 .SH DESCRIPTION
37 .PP
38 This program is part of
39 .BR "Netpbm" (1)\c
40 \&.
41 .PP
42 \fBppmtopcx\fP reads a PPM image as input and produces a PCX file
43 as output. The type of the PCX file depends on the number of colors
44 in the input image:
45
46
47 .TP
48 16 colors or fewer:
49 1 bit/pixel, 1-4 planes, colormap in header
50
51 .TP
52 more than 16 colors, but no more than 256:
53 8 bits/pixel, 1 plane, colormap at the end of the file.
54
55 .TP
56 More than 256 colors:
57 24bit truecolor file (8 bits/pixel, 3 planes).
58
59
60 .PP
61 You can override some of that and explicitly choose the format with
62 the options below.
63
64 .UN options
65 .SH OPTIONS
66 .PP
67 In addition to the options common to all programs based on libnetpbm
68 (most notably \fB-quiet\fP, see
69 .UR index.html#commonoptions
70 Common Options
71 .UE
72 \&), \fBppmtopcx\fP recognizes the following
73 command line options:
74
75
76 .TP
77 \fB-24bit\fP
78 Produce a 24bit truecolor PCX file, even if the image has 256
79 colors or fewer.
80
81 .TP
82 \fB-8bit\fP
83 Produce an 8bit (256 colors) PCX file, even if the image has 16
84 colors or fewer.
85 .sp
86 This option was added in Netpbm 10.18 (August 2003).
87
88 .TP
89 \fB-packed\fP
90 Use "packed pixel" format for files with 16 colors or
91 fewer: 1, 2, or 4 bits/pixel, 1 plane.
92
93 .TP
94 \fB-stdpalette\fP
95 Instead of computing a palette from the colors in the image, use
96 a standard, built-in 16 color palette. If the image contains a color
97 that is not in the standard palette, \fBppmtopcx\fP fails.
98 .sp
99 The standard palette is not only a set of colors, but a specific
100 mapping of palette indexes to colors. E.g. red is 4.
101 .sp
102 You can use \fBpnmremap\fP with a suitable PPM image of the standard
103 palette to adapt your image to use exactly those colors in the palette
104 so that \fBppmtopcx -stdpalette\fP will work on it.
105 .sp
106 The file \fBpcxstd.ppm\fP, part of Netpbm, contains the standard
107 palette.
108 .sp
109 Although the PCX header tells exactly what palette is used in the
110 file, some older PCX interpreters do not use that information. They
111 instead assume the standard palette. If you don't use the
112 \fB-stdpalette\fP option, \fBppmtopcx\fP, \fBppmtopcx\fP may create
113 an image that uses a different palette (a rearrangement of the same
114 colors) and then one of these older interpreters would interpret the
115 colors in the image wrong.
116 .sp
117 You cannot specify this option along with \fB-palette\fP.
118 .sp
119 This option was new in Netpbm 10.22 (April 2004).
120
121 .TP
122 \fB-palette=\fP\fIpalettefile\fP
123 Instead of computing the palette from the colors in the image, use
124 the palette from the file \fIpalettefile\fP. If the palette contains
125 a color that is not in that palette, \fBppmtopcx\fP fails.
126 .sp
127 The palette file must be a PPM image that contains one pixel for
128 each color in the palette. It doesn't matter what the aspect ratio
129 of the palette image is. The order of the colors in the PCX palette
130 is the order of the pixels in the PPM image in standard western
131 reading order (left to right, top to bottom). If there is a duplicate
132 color in the palette, \fBppmtopcx\fP chooses between them arbitrarily
133 in building the PCX raster.
134 .sp
135 You would need this only if you have a PCX reader that can't read
136 the palette that is in the PCX file and instead assumes some particular
137 palette. See also the \fB-stdpalette\fP option.
138 .sp
139 If your input image might contain colors other than those in your
140 palette, you can convert the input image to one that contains only
141 those colors in your palette with \fBpnmremap\fP.
142 .sp
143 You cannot specify this along with \fB-stdpalette\fP.
144 .sp
145 This option was new in Netpbhm 10.25 (October 2004).
146
147 .TP
148 \fB-planes=\fP\fIplanes\fP
149 Generate a PCX file with \fIplanes\fP planes, even though the number
150 of colors in the image could be represented in fewer. This makes the file
151 larger, but some PCX interpreters are capable of processing only certain
152 numbers of planes.
153 .sp
154 This is meaningful only when \fBppmtopcx\fP generates an image in
155 the 16 color palette format without packed pixels. Consequently, you
156 cannot specify this option together with \fB-24bit\fP or
157 \fB-8bit\fP or \fB-packed\fP.
158 .sp
159 The valid values for \fIplanes\fP are 1, 2, 3, and 4. By default,
160 \fBppmtopcx\fP chooses the smallest number of planes that can represent
161 the colors in the image. E.g. if there are 5 colors, \fBppmtopcx\fP
162 chooses 3 planes.
163 .sp
164 This option was new in Netpbm 10.21 (March 2004).
165
166 .TP
167 \fB-xpos=\fP\fIcols\fP
168
169 .TP
170 \fB-ypos=\fP\fIrows\fP
171 These options set the position of the image in some field
172 (e.g. on a screen) in columns to the right of the left edge and rows
173 below the top edge. The PCX format contains image position
174 information. Don't confuse this with the position of an area of
175 interest within the image. For example, using \fBpnmpad\fP to add a
176 10 pixel left border to an image and then converting that image to PCX
177 with xpos = 0 is not the same as converting the original image to PCX
178 and setting xpos = 10.
179 .sp
180 The values may be from -32767 to 32768.
181 .sp
182 The default for each is zero.
183
184
185
186 .UN seealso
187 .SH SEE ALSO
188 .BR "pcxtoppm" (1)\c
189 \&,
190 .BR "ppm" (1)\c
191 \&
192
193 .UN authors
194 .SH AUTHORS
195
196 Copyright (C) 1994 by Ingo Wilken (\[email protected]\fP)
197 .PP
198 Based on previous work by Michael Davidson.
199 .SH DOCUMENT SOURCE
200 This manual page was generated by the Netpbm tool 'makeman' from HTML
201 source. The master documentation is at
202 .IP
203 .B http://netpbm.sourceforge.net/doc/ppmtopcx.html
204 .PP