1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmtopcx User Manual</title></head>
<body>
<h1>ppmtopcx</h1>
Updated: 26 September 2020
<br>
<a href="#index">Table Of Contents</a>
<h2>NAME</h2>
ppmtopcx - convert a PPM image to a PCX file
<h2 id="synopsis">SYNOPSIS</h2>
<b>ppmtopcx</b>
[<b>-24bit</b>]
[<b>-8bit</b>]
[<b>-packed</b>]
[<b>-stdpalette</b>]
[<b>-palette=</b><i>palettefile</i>]
[<b>-planes=</b><i>planes</i>]
[<b>-xpos=</b><i>cols</i>]
[<b>-ypos=</b><i>rows</i>]
[<i>ppmfile</i>]
<h2 id="description">DESCRIPTION</h2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>ppmtopcx</b> 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 input image:
<dl compact>
<dt>16 colors or fewer:
<dd>1 bit/pixel, 1-4 planes, colormap in header
<dt>more than 16 colors, but no more than 256:
<dd>8 bits/pixel, 1 plane, colormap at the end of the file.
<dt>More than 256 colors:
<dd>24bit truecolor file (8 bits/pixel, 3 planes).
</dl>
<p>You can override some of that and explicitly choose the format with
the options below.
<h2 id="options">OPTIONS</h2>
<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>ppmtopcx</b> recognizes the following
command line options:
<dl compact>
<dt><b>-24bit</b>
<dd>Produce a 24bit truecolor PCX file, even if the image has 256
colors or fewer.
<dt><b>-8bit</b>
<dd>Produce an 8bit (256 colors) PCX file, even if the image has 16
colors or fewer.
<p>This option was added in Netpbm 10.18 (August 2003).
<dt><b>-packed</b>
<dd>Use "packed pixel" format for files with 16 colors or
fewer: 1, 2, or 4 bits/pixel, 1 plane.
<dt><b>-stdpalette</b>
<dd>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, <b>ppmtopcx</b> fails.
<p>The standard palette is not only a set of colors, but a specific
mapping of palette indexes to colors. E.g. red is 4.
<p>You can use <b>pnmremap</b> with a suitable PPM image of the standard
palette to adapt your image to use exactly those colors in the palette
so that <b>ppmtopcx -stdpalette</b> will work on it.
<p>The file <b>pcxstd.ppm</b>, part of Netpbm, contains the standard
palette.
<p>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
<b>-stdpalette</b> option, <b>ppmtopcx</b>, <b>ppmtopcx</b> 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.
<p>You cannot specify this option along with <b>-palette</b>.
<p>This option was new in Netpbm 10.22 (April 2004).
<dt><b>-palette=</b><i>palettefile</i>
<dd>Instead of computing the palette from the colors in the image, use
the palette from the file <i>palettefile</i>. If the palette contains
a color that is not in that palette, <b>ppmtopcx</b> fails.
<p>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, <b>ppmtopcx</b> chooses between them arbitrarily
in building the PCX raster.
<p>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 <b>-stdpalette</b> option.
<p>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 <b>pnmremap</b>.
<p>You cannot specify this along with <b>-stdpalette</b>.
<p>This option was new in Netpbhm 10.25 (October 2004).
<dt><b>-planes=</b><i>planes</i>
<dd>Generate a PCX file with <i>planes</i> 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.
<p>This is meaningful only when <b>ppmtopcx</b> generates an image in
the 16 color palette format without packed pixels. Consequently, you
cannot specify this option together with <b>-24bit</b> or
<b>-8bit</b> or <b>-packed</b>.
<p>The valid values for <i>planes</i> are 1, 2, 3, and 4. By default,
<b>ppmtopcx</b> chooses the smallest number of planes that can represent
the colors in the image. E.g. if there are 5 colors, <b>ppmtopcx</b>
chooses 3 planes.
<p>This option was new in Netpbm 10.21 (March 2004).
<dt><b>-xpos=</b><i>cols</i>
<dt><b>-ypos=</b><i>rows</i>
<dd> 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 <b>pnmpad</b> 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.
<p>The values may be from -32767 to 32768.
<p>The default for each is zero.
</dl>
<h2 id="seealso">SEE ALSO</h2>
<b><a href="pcxtoppm.html">pcxtoppm</a></b>,
<b><a href="ppm.html">ppm</a></b>
<h2 id="authors">AUTHORS</h2>
Copyright (C) 1994 by Ingo Wilken (<a
href="mailto:Ingo.Wilken@informatik.uni-oldenburg.de">Ingo.Wilken@informatik.uni-oldenburg.de</a>)
<p>Based on previous work by Michael Davidson.
<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#authors">AUTHORS</a>
</ul>
</body>
</html>
|