.TL
Hpcdtoppm User Manual
.SH 1
hpcdtoppm
.LP
Updated: 7 August 2003
.br
Table Of Contents
.SH 2
NAME
.LP
hpcdtoppm - convert a Photo-CD image into a PBM image
.SH 2
SYNOPSIS
.LP
\fBhpcdtoppm\fR
\fIinfile\fR
[\fB-a\fR]
[{\fB-C\fR|\fB-0\fR|\fB-Overview\fR|\fB-O\fR} \fIfile opt\fR]
[\fB-c0\fR]
[\fB-c-\fR]
[\fB-c+\fR]
[\fB-crop\fR]
[\fB-d\fR]
[\fB-dpi\fR \fIf\fR]
[\fB-eps\fR]
[\fB-epsd\fR]
[\fB-epsg\fR]
[\fB-fak\fR \fIscale\fR]
[\fB-hori\fR]
[\fB-i\fR]
[\fB-l\fR]
[\fB-m\fR]
[\fB-n\fR]
[\fB-pb\fR \fIpos\fR]
[\fB-pgm\fR]
[\fB-ph\fR \fIheight\fR]
[\fB-pl\fR \fIpos\fR]
[\fB-pos\fR]
[\fB-ppm\fR]
[\fB-ps\fR]
[\fB-psd\fR]
[\fB-psg\fR]
[\fB-pw\fR \fIwidth\fR]
[\fB-r\fR]
[\fB-rep\fR]
[\fB-S\fR \fIlong short\fR]
[\fB-s\fR]
[\fB-vert\fR]
[\fB-x\fR]
[\fB-ycc\fR]
[\fB-1\fR|\fB-Base/16\fR|\fB-128x192\fR]
[\fB-2\fR|\fB-Base/4\fR|\fB-256x384\fR]
[\fB-3\fR|\fB-Base\fR|\fB-512x768\fR]
[\fB-4\fR|\fB-4Base\fR|\fB-1024x1536\fR]
[\fB-5\fR|\fB-16Base\fR|\fB-2048x3072\fR]
[\fB-6\fR|\fB-64Base\fR|\fB-4096x6144\fR]
[\fIoutfile\fR]
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
.LP
This program accepts Photo-CD image or overview file data from the
specified input file, \fIinfile\fR (or, if the resolution is lower
than 64Base and the file argument is specified as \fB-\fR, from
standard input), and writes either PBM Format or PostScript to the
specified output file (or to standard output if no file is specified).
.LP
On a standard Photo-CD, image files appear in the directory
\fBphoto_cd/images\fR, in files with names of the form
img\fInnnn\fR.pcd, where \fInnnn\fR is a 4-digit-number. The
overview file appears in \fBphoto_cd/overview.pcd\fR.
.LP
Photo-CD images are stored using as many as 6 different resolutions:
.DS L
Format Resolution
------ ----------
64Base 4096x6144 (ProPhotoCD only)
16Base 2048x3072
4Base 1024x1536
Base 512x768
Base/4 256x384
Base/16 128x192
.DE
.LP
The overview file employs Base/16 format.
.SH 2
OPTIONS
.LP
Invoking \fBhpcdtoppm\fR without arguments produces a list of default
values. Note that you can supply only one size option.
.RS
.IP "\fB-a\fR"
Automatically determine image orientation (this option is
experimental, and does not work for overview files).
.IP "{\fB-C\fR | \fB-0\fR | \fB-Overview\fR | \fB-O\fR } \fIfile opt\fR"
Extract all images from an overview file. The mandatory
\fIfile\fR argument is the name of a PPM file; output files are named
\fIfilennnn\fR, where \fInnnn\fR is a 4-digit number. Overview
images are extracted in their original Base/16 format. The value of
\fIopt\fR determines the orientation of the contact sheet image;
recognized values are:
.RS
.IP "\fBn\fR"
Do not rotate the image.
.IP "\fBl\fR"
Rotate the picture counter-clockwise (portrait mode).
.IP "\fBr\fR"
Rotate the picture clockwise (portrait mode).
.RE
.IP "\fB-c0\fR"
Do not correct (brighten or darken) the image.
.IP "\fB-c-\fR"
Darken the image.
.IP "\fB-c+\fR"
Brighten the image.
.IP "\fB-crop\fR"
Cut off the black frame which sometimes appears at the image
borders.
.IP "\fB-d\fR"
Show only the decompressed difference rather than the complete image
(applicable only to 4Base and 16Base images).
.IP "\fB-dpi\fR \fIres\fR"
Set the printer resolution to \fIres\fR for dithered Postscript
images.
.IP "\fB-eps\fR"
Write a RGB Encapsulated Postscript color image.
.IP "\fB-epsd\fR"
Write a Floyd-Steinberg dithered image in Encapsulated Postscript.
.IP "\fB-epsg\fR"
Write a grayscale image in Encapsulated Postscript.
.IP "\fB-fak\fR \fIscale\fR"
Set the scaling factor for dithered PostScript images to
\fIscale\fR.
.IP "\fB-hori\fR"
Flip the image horizontally.
.IP "\fB-i\fR"
Send information from an image file header to Standard Error.
.IP "\fB-l\fR"
Rotate the picture counter-clockwise (portrait mode).
.IP "\fB-m\fR"
Write messages about the phases of decoding to standard error.
.IP "\fB-n\fR"
Do not rotate the image.
.IP "\fB-pb\fR \fIpos\fR"
Set the bottom position of the Postscript image to \fIpos\fR.
.IP "\fB-pgm\fR"
Write a \fIpgm\fR (grayscale) image.
.IP "\fB-ph height\fR"
Set the height of the Postscript image to \fIheight\fR.
.IP "\fB-pl\fR \fIpos\fR"
Set the leftmost position of the Postscript image to \fIpos\fR.
.IP "\fB-pos\fR"
Print the relative starting position of the data for the current
resolution.
.IP "\fB-ppm\fR"
Write a \fIppm\fR RGB (color) image.
.IP "\fB-ps\fR"
Write a RGB Postscript color image.
.IP "\fB-psd\fR"
Write a Floyd-Steinberg dithered image in Postscript.
.IP "\fB-psg\fR"
Write a Postscript grayscale image.
.IP "\fB-pw width\fR"
Set the width of the Postscript image to \fIwidth\fR.
.IP "\fB-r\fR"
Rotate the picture clockwise (portrait mode).
.IP "\fB-rep\fR"
Try to jump over reading errors in the Huffman code.
.IP "\fB-S\fR \fIlong\fR \fIshort\fR"
Cut out a subrectangle with boundaries defined by the values:
.RS
.IP "\fIlong\fR"
For the longer side of the image.
.IP "\fIshort\fR"
For the shorter side of the image.
.RE
where \fIlong\fR and \fIshort\fR take one of two forms:
.RS
.IP "\fBa-b\fR"
Cut from position \fIa\fR to position \fIb\fR.
.IP "\fBa+b\fR"
Starting at offset \fIa\fR, cut a length of \fIb\fR.
.RE
and where \fIa\fR and \fIb\fR are either integers representing pixel
locations, or floating point values over the range [0.0 ... 1.0],
representing the fraction of the length of a side.
.IP "\fB-s\fR"
Apply a simple sharpness operator to the luminosity channel.
.IP "\fB-vert\fR"
Flip the image vertically.
.IP "\fB-x\fR"
Overskip Mode (applicable to Base/16, Base/4, Base and 4Base).
In Photo-CD images the luminosity channel is stored in full
resolution, the two chromaticity channels are stored in half
resolution only and have to be interpolated. In Overskip Mode, the
chromaticity channels of the next higher resolution are taken instead
of interpolating. To see the difference, generate one PPM with and
one PPM without this option. Use \fBpamarith\fR to generate the difference image
of these two images. Call \fBppmhist\fR
for this difference or show it with \fBxv\fR (push the \fBHistEq\fR button
in the color editor).
.IP "\fB-ycc\fR"
Write the image in a variation on PPM format in which the samples
are YCC instead of RGB.
.IP "\fB-1\fR|\fB-Base/16\fR|\fB-128x192\fR"
Extract the Base/16 image.
.IP "\fB-2\fR|\fB-Base/4\fR|\fB-256x384\fR"
Extract the Base/4 image.
.IP "\fB-3\fR|\fB-Base\fR|\fB-512x768\fR"
Extract the Base image.
.IP "\fB-4\fR|\fB-4Base\fR|\fB-1024x1536\fR"
Extract the 4Base image.
.IP "\fB-5\fR|\fB-16Base\fR|\fB-2048x3072\fR"
Extract the 16Base image.
.IP "\fB-6\fR|\fB-64Base\fR|\fB-4096x6144\fR"
Extract the 64Base image. This resolution can be extracted from
ProPhotoCD images only. The path of the 64Base extension files is
derived from the path to the image file. This means that it doesn't
work on stdin an the directory structure must be the very same as on
the ProPhotoCD.
.RE
.SH 2
Postcript Output
.LP
.LP
For Postscript output (options \fB-ps\fR, \fB-eps\fR,
\fB-psg\fR, \fB-epsg\fR, \fB-psd\fR, \fB-epsg\fR) you can define
both the resolution and placement of the image. Both size and
position are specified in points (1/72 inch).
.LP
The position of the image (where the origin is assumed to be at the
lower left corner of the page) is controlled by the \fB-pl\fR and
\fB-pb\fR options (applicable at all resolutions).
.LP
The size of color and grayscale images is changed with the
\fB-pw\fR and \fB-ph\fR options. Every image pixel is mapped onto
one Postscript pixel.
.LP
There are three modes of control for dithered Postscript:
.RS
.IP "Image size"
(\fB-pw\fR and \fB-ph\fR)
.IP "Printer resolution"
(\fB-dpi\fR)
.IP "Scaling factor"
(\fB-fak\fR)
.RE
.LP
These three factors are interdependent, hence no more then two can
be specified simultaneously. Using \fB-dpi\fR and the
\fB-pw\fR/\fB-ph\fR options together often yields pleasing results.
Even using the default values for these options will produce results
differing from those obtained without use of the options.
.SH 2
Limitations
.LP
.LP
The program ignores read protection.
.LP
The \fB-i\fR option is not working correctly.
.LP
Available information obout the Photo-CD format is vague; this
program was developed by trial-and-error after staring at hex-dumps.
Please send bugs reports and patches to the author.
.SH 2
SEE ALSO
.LP
pcdovtoppm,
pamarith,
ppm,
ppmhist,
pnmquant,
ppmtopgm,
ppmtorgb3,
\fBxv\fR
.SH 2
VERSION
.LP
.LP
The name \fBhpcdtoppm\fR stands for "Hadmut's pcdtoppm," to
make it distinguishable in the event that someone else is building a
similar application and naming it \fBpcdtoppm\fR.
.LP
This is version 0.6.
.SH 2
AUTHOR
.LP
Copyright (c) 1992, 1993, 1994 by Hadmut Danisch (danisch@ira.uka.de).
.LP
Hadmut Danish has given permission to Bryan Henderson (August 2003)
to distribute this documentation as part of Netpbm on Sourceforge and
therefore to license this copy of this documentation to the public
with the following Sourceforge-compatible license. Note that this
license does not contain a restriction on one's right to sell the
material, as does the \fBhpcdtoppm\fR program itself and other copies
of this documentation.
.LP
This software is not public domain. Permission to use and
distribute this software and its documentation for noncommercial use
and without fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright notice and
this permission notice appear in supporting documentation.
.LP
The \fBhpcdtoppm\fR software itself (as opposed to this supporting
documentation) is licensed by Danisch under a similar license, but
with an additional restriction that a recipient may not sell the
software or use it in profit-making activity. See the source code of
the program for details on its license.
.LP
Manual page extensively modified by R. P. C. Rodgers (rodgers@nlm.nih.gov).
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
NAME
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
POSTSCRIPT OUTPUT
.IP \(bu
LIMITATIONS
.IP \(bu
SEE ALSO
.IP \(bu
VERSION
.IP \(bu
AUTHOR
.LP
|