.TL Ppmtopcx User Manual .SH 1 ppmtopcx .LP Updated: 27 March 2004 .br Table Of Contents .SH 2 NAME .LP ppmtopcx - convert a PPM image to a PCX file .SH 2 SYNOPSIS .LP \fBppmtopcx\fR [\fB-24bit\fR] [\fB-8bit\fR] [\fB-packed\fR] [\fB-stdpalette\fR] [\fB-palette=\fR\fIpalettefile\fR] [\fB-planes=\fR\fIplanes\fR] [\fB-xpos=\fR\fIcols\fR] [\fB-ypos=\fR\fIrows\fR] [\fIppmfile\fR] .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBppmtopcx\fR reads a PPM image as input and produces a PCX file as output. The type of the PCX file depends on the number of colors in the pixmap: .RS .IP "16 colors or fewer:" 1 bit/pixel, 1-4 planes. .IP "more than 16 colors, but no more than 256:" 8 bits/pixel, 1 plane, colormap at the end of the file. .IP "More than 256 colors:" 24bit truecolor file (8 bits/pixel, 3 planes). .RE .LP You can override some of that and explicitly choose the format with the options below. .SH 2 OPTIONS .LP .RS .IP "\fB-24bit\fR" Produce a 24bit truecolor PCX file, even if the image has 256 colors or fewer. .IP "\fB-8bit\fR" Produce an 8bit (256 colors) PCX file, even if the image has 16 colors or fewer. .LP This option was added in Netpbm 10.18 (August 2003). .IP "\fB-packed\fR" Use "packed pixel" format for files with 16 colors or fewer: 1, 2, or 4 bits/pixel, 1 plane. .IP "\fB-stdpalette\fR" Instead of computing a palette from the colors in the image, use a standard, built-in 16 color palette. If the image contains a color that is not in the standard palette, \fBppmtopcx\fR fails. .LP The standard palette is not only a set of colors, but a specific mapping of palette indexes to colors. E.g. red is 4. .LP You can use \fBpnmremap\fR with a suitable PPM image of the standard palette to adapt your image to use exactly those colors in the palette so that \fBppmtopcx -stdpalette\fR will work on it. .LP The file \fBpcxstd.ppm\fR, part of Netpbm, contains the standard palette. .LP Although the PCX header tells exactly what palette is used in the file, some older PCX interpreters do not use that information. They instead assume the standard palette. If you don't use the \fB-stdpalette\fR option, \fBppmtopcx\fR, \fBppmtopcx\fR may create an image that uses a different palette (a rearrangement of the same colors) and then one of these older interpreters would interpret the colors in the image wrong. .LP You cannot specify this option along with \fB-palette\fR. .LP This option was new in Netpbm 10.22 (April 2004). .IP "\fB-palette=\fR\fIpalettefile\fR" Instead of computing the palette from the colors in the image, use the palette from the file \fIpalettefile\fR. If the palette contains a color that is not in that palette, \fBppmtopcx\fR fails. .LP The palette file must be a PPM image that contains one pixel for each color in the palette. It doesn't matter what the aspect ratio of the palette image is. The order of the colors in the PCX palette is the order of the pixels in the PPM image in standard western reading order (left to right, top to bottom). If there is a duplicate color in the palette, \fBppmtopcx\fR chooses between them arbitrarily in building the PCX raster. .LP You would need this only if you have a PCX reader that can't read the palette that is in the PCX file and instead assumes some particular palette. See also the \fB-stdpalette\fR option. .LP If your input image might contain colors other than those in your palette, you can convert the input image to one that contains only those colors in your palette with \fBpnmremap\fR. .LP You cannot specify this along with \fB-stdpalette\fR. .LP This option was new in Netpbhm 10.25 (October 2004). .IP "\fB-planes=\fR\fIplanes\fR" Generate a PCX file with \fIplanes\fR planes, even though the number of colors in the image could be represented in fewer. This makes the file larger, but some PCX interpreters are capable of processing only certain numbers of planes. .LP This is meaningful only when \fBppmtopcx\fR generates an image in the 16 color palette format without packed pixels. Consequently, you cannot specify this option together with \fB-24bit\fR or \fB-8bit\fR or \fB-packed\fR. .LP The valid values for \fIplanes\fR are 1, 2, 3, and 4. By default, \fBppmtopcx\fR chooses the smallest number of planes that can represent the colors in the image. E.g. if there are 5 colors, \fBppmtopcx\fR chooses 3 planes. .LP This option was new in Netpbm 10.21 (March 2004). .IP "\fB-xpos=\fR\fIcols\fR" .IP "\fB-ypos=\fR\fIrows\fR" These options set the position of the image in some field (e.g. on a screen) in columns to the right of the left edge and rows below the top edge. The PCX format contains image position information. Don't confuse this with the position of an area of interest within the image. For example, using \fBpnmpad\fR to add a 10 pixel left border to an image and then converting that image to PCX with xpos = 0 is not the same as converting the original image to PCX and setting xpos = 10. .LP The values may be from -32767 to 32768. .LP The default for each is zero. .RE .SH 2 SEE ALSO .LP \fBpcxtoppm\fR, \fBppm\fR .SH 2 AUTHORS .LP Copyright (C) 1994 by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de) .LP Based on previous work by Michael Davidson. .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu OPTIONS .IP \(bu SEE ALSO .IP \(bu AUTHORS .LP