Blame userguide/ppmtopcx.html

Packit 78deda
Packit 78deda
<HTML><HEAD><TITLE>Ppmtopcx User Manual</TITLE></HEAD>
Packit 78deda
<BODY>
Packit 78deda

ppmtopcx

Packit 78deda
Updated: 27 March 2004
Packit 78deda

Packit 78deda
Table Of Contents
Packit 78deda
Packit 78deda
 
Packit 78deda

NAME

Packit 78deda
Packit 78deda
ppmtopcx - convert a PPM image to a PCX file
Packit 78deda
Packit 78deda
 
Packit 78deda

SYNOPSIS

Packit 78deda
Packit 78deda
ppmtopcx
Packit 78deda
Packit 78deda
[-24bit]
Packit 78deda
Packit 78deda
[-8bit]
Packit 78deda
Packit 78deda
[-packed]
Packit 78deda
Packit 78deda
[-stdpalette]
Packit 78deda
Packit 78deda
[-palette=palettefile]
Packit 78deda
Packit 78deda
[-planes=planes]
Packit 78deda
Packit 78deda
[-xpos=cols]
Packit 78deda
Packit 78deda
[-ypos=rows]
Packit 78deda
Packit 78deda
[ppmfile]
Packit 78deda
Packit 78deda
 
Packit 78deda

DESCRIPTION

Packit 78deda
Packit 78deda

This program is part of Netpbm.

Packit 78deda
Packit 78deda

ppmtopcx reads a PPM image as input and produces a PCX file

Packit 78deda
as output.  The type of the PCX file depends on the number of colors
Packit 78deda
in the input image:
Packit 78deda
Packit 78deda
Packit 78deda
16 colors or fewer:
Packit 78deda
Packit 78deda
1 bit/pixel, 1-4 planes.
Packit 78deda
Packit 78deda
more than 16 colors, but no more than 256:
Packit 78deda
Packit 78deda
8 bits/pixel, 1 plane, colormap at the end of the file.
Packit 78deda
Packit 78deda
More than 256 colors:
Packit 78deda
Packit 78deda
24bit truecolor file (8 bits/pixel, 3 planes).
Packit 78deda
Packit 78deda
Packit 78deda
Packit 78deda

You can override some of that and explicitly choose the format with

Packit 78deda
the options below.
Packit 78deda
Packit 78deda
Packit 78deda
 
Packit 78deda

OPTIONS

Packit 78deda
Packit 78deda
Packit 78deda
-24bit
Packit 78deda
Packit 78deda
Produce a 24bit truecolor PCX file, even if the image has 256
Packit 78deda
colors or fewer.
Packit 78deda
Packit 78deda
-8bit
Packit 78deda
Packit 78deda
Produce an 8bit (256 colors) PCX file, even if the image has 16
Packit 78deda
colors or fewer.
Packit 78deda
Packit 78deda

This option was added in Netpbm 10.18 (August 2003).

Packit 78deda
Packit 78deda
-packed
Packit 78deda
Packit 78deda
Use "packed pixel" format for files with 16 colors or
Packit 78deda
fewer: 1, 2, or 4 bits/pixel, 1 plane.
Packit 78deda
Packit 78deda
-stdpalette
Packit 78deda
Packit 78deda
Instead of computing a palette from the colors in the image, use
Packit 78deda
a standard, built-in 16 color palette.  If the image contains a color
Packit 78deda
that is not in the standard palette, ppmtopcx fails.
Packit 78deda
Packit 78deda

The standard palette is not only a set of colors, but a specific

Packit 78deda
mapping of palette indexes to colors.  E.g. red is 4.
Packit 78deda
Packit 78deda

You can use pnmremap with a suitable PPM image of the standard

Packit 78deda
palette to adapt your image to use exactly those colors in the palette
Packit 78deda
so that ppmtopcx -stdpalette will work on it.
Packit 78deda
Packit 78deda

The file pcxstd.ppm, part of Netpbm, contains the standard

Packit 78deda
palette.
Packit 78deda
Packit 78deda

Although the PCX header tells exactly what palette is used in the

Packit 78deda
file, some older PCX interpreters do not use that information.  They
Packit 78deda
instead assume the standard palette.  If you don't use the
Packit 78deda
-stdpalette option, ppmtopcx, ppmtopcx may create
Packit 78deda
an image that uses a different palette (a rearrangement of the same
Packit 78deda
colors) and then one of these older interpreters would interpret the
Packit 78deda
colors in the image wrong.
Packit 78deda
Packit 78deda

You cannot specify this option along with -palette.

Packit 78deda
Packit 78deda

This option was new in Netpbm 10.22 (April 2004).

Packit 78deda
Packit 78deda
-palette=palettefile
Packit 78deda
Packit 78deda
Instead of computing the palette from the colors in the image, use
Packit 78deda
the palette from the file palettefile.  If the palette contains
Packit 78deda
a color that is not in that palette, ppmtopcx fails.
Packit 78deda
Packit 78deda

The palette file must be a PPM image that contains one pixel for

Packit 78deda
each color in the palette.  It doesn't matter what the aspect ratio
Packit 78deda
of the palette image is.  The order of the colors in the PCX palette
Packit 78deda
is the order of the pixels in the PPM image in standard western
Packit 78deda
reading order (left to right, top to bottom).  If there is a duplicate
Packit 78deda
color in the palette, ppmtopcx chooses between them arbitrarily
Packit 78deda
in building the PCX raster.
Packit 78deda
Packit 78deda

You would need this only if you have a PCX reader that can't read

Packit 78deda
the palette that is in the PCX file and instead assumes some particular
Packit 78deda
palette.  See also the -stdpalette option.
Packit 78deda
Packit 78deda

If your input image might contain colors other than those in your

Packit 78deda
palette, you can convert the input image to one that contains only
Packit 78deda
those colors in your palette with pnmremap.
Packit 78deda
Packit 78deda

You cannot specify this along with -stdpalette.

Packit 78deda
Packit 78deda

This option was new in Netpbhm 10.25 (October 2004).

Packit 78deda
Packit 78deda
-planes=planes
Packit 78deda
Packit 78deda
Generate a PCX file with planes planes, even though the number
Packit 78deda
of colors in the image could be represented in fewer.  This makes the file
Packit 78deda
larger, but some PCX interpreters are capable of processing only certain
Packit 78deda
numbers of planes.
Packit 78deda
Packit 78deda

This is meaningful only when ppmtopcx generates an image in

Packit 78deda
the 16 color palette format without packed pixels.  Consequently, you
Packit 78deda
cannot specify this option together with -24bit or
Packit 78deda
-8bit or -packed.
Packit 78deda
Packit 78deda

The valid values for planes are 1, 2, 3, and 4. By default,

Packit 78deda
ppmtopcx chooses the smallest number of planes that can represent
Packit 78deda
the colors in the image.  E.g. if there are 5 colors, ppmtopcx 
Packit 78deda
chooses 3 planes.
Packit 78deda
Packit 78deda

This option was new in Netpbm 10.21 (March 2004).

Packit 78deda
     
Packit 78deda
-xpos=cols
Packit 78deda
Packit 78deda
-ypos=rows
Packit 78deda
Packit 78deda
These options set the position of the image in some field
Packit 78deda
(e.g. on a screen) in columns to the right of the left edge and rows
Packit 78deda
below the top edge.  The PCX format contains image position
Packit 78deda
information.  Don't confuse this with the position of an area of
Packit 78deda
interest within the image.  For example, using pnmpad to add a
Packit 78deda
10 pixel left border to an image and then converting that image to PCX
Packit 78deda
with xpos = 0 is not the same as converting the original image to PCX
Packit 78deda
and setting xpos = 10.
Packit 78deda
Packit 78deda

The values may be from -32767 to 32768.

Packit 78deda
Packit 78deda

The default for each is zero.

Packit 78deda
Packit 78deda
Packit 78deda
Packit 78deda
Packit 78deda
 
Packit 78deda

SEE ALSO

Packit 78deda
Packit 78deda
pcxtoppm,
Packit 78deda
ppm
Packit 78deda
Packit 78deda
 
Packit 78deda

AUTHORS

Packit 78deda
Packit 78deda
Copyright (C) 1994 by Ingo Wilken (
Packit 78deda
HREF="mailto:Ingo.Wilken@informatik.uni-oldenburg.de">Ingo.Wilken@informatik.uni-oldenburg.de)
Packit 78deda
Packit 78deda

Based on previous work by Michael Davidson.

Packit 78deda
Packit 78deda

Packit 78deda
 
Packit 78deda

Table Of Contents

Packit 78deda
    Packit 78deda
  • NAME
  • Packit 78deda
  • SYNOPSIS
  • Packit 78deda
  • DESCRIPTION
  • Packit 78deda
  • OPTIONS
  • Packit 78deda
  • SEE ALSO
  • Packit 78deda
  • AUTHORS
  • Packit 78deda
    Packit 78deda
    </BODY>
    Packit 78deda
    </HTML>