292 lines
8.0 KiB
HTML
292 lines
8.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of pnmtotiffcmyk</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>pnmtotiffcmyk</H1>
|
|
Section: User Commands (1)<BR>Updated: 9 December 1999<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="ixAAB"></A>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
pnmtotiffcmyk - convert a portable anymap into a CMYK encoded TIFF file
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>pnmtotiffcmyk </B>
|
|
|
|
|
|
[<B>Compargs</B>][<B>Tiffargs</B>][<B>Convargs</B>][
|
|
|
|
<I>pnmfile</I>
|
|
|
|
]
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">Compargs:<DD>
|
|
[<B>-none</B>|<B>-packbits</B>|<B>-lzw</B>
|
|
|
|
[<B>-predictor</B>
|
|
|
|
<I>n</I>]]
|
|
|
|
<DT id="2">Tiffargs:<DD>
|
|
[<B>-msb2lsb</B>|<B>-lsb2msb</B>]
|
|
|
|
[<B>-rowsperstrip</B>
|
|
|
|
<I>n</I>]
|
|
|
|
<BR>
|
|
|
|
[<B>-lowdotrange</B>
|
|
|
|
<I>n</I>]
|
|
|
|
[<B>-highdotrange</B>
|
|
|
|
<I>n</I>]
|
|
|
|
<BR>
|
|
|
|
[<B>-knormal</B>|<B>-konly</B>|<B>-kremove</B>]
|
|
|
|
<BR>
|
|
|
|
<DT id="3">Convargs:<DD>
|
|
[[<B>-default</B>][<B>Defargs</B>]|<B>-negative</B>]
|
|
|
|
<DT id="4">Defargs:<DD>
|
|
[<B>-theta</B>
|
|
|
|
<I>deg</I>]
|
|
|
|
[<B>-gamma</B>
|
|
|
|
<I>n</I>]
|
|
|
|
[<B>-gammap</B>
|
|
|
|
|
|
<I>-1</I>|<B>-gammap</B>
|
|
|
|
<I>n</I>]
|
|
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Reads a portable anymap as input.
|
|
Produces a CMYK encoded TIFF file as output.
|
|
Optionally modifies the colour balance and black level, and removes CMY
|
|
from under K.
|
|
<A NAME="ixAAC"></A>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
The order of most options is not important, but options for particular
|
|
conversion algorithms must appear after the algorithm is selected
|
|
(<B>-default</B>,<B>-negative</B>).
|
|
|
|
If no algorithm is selected then
|
|
<B>-default</B>
|
|
|
|
is assumed and the appropriate options
|
|
(<B>-theta</B>,<B>-gamma</B>,<B>-gammap</B>)
|
|
|
|
can appear anywhere.
|
|
<DL COMPACT>
|
|
<DT id="5"><B>-none</B>,<B>-packbits</B>,<B>-lzw</B>,<B>-predictor</B>
|
|
|
|
<DD>
|
|
Tiff files can be compressed. By default LZW decompression is used, but
|
|
(apparently) some readers cannot read this, so you may want to select a
|
|
different algorithm
|
|
(<B>-none</B>,<B>-packbits</B>).
|
|
|
|
For LZW compression, a
|
|
<B>-predictor</B>
|
|
|
|
value of 2 forces horizontal differencing of scanlines before encoding; a
|
|
value of 1 forces no differencing.
|
|
<DT id="6"><B>-msb2lsb</B>,<B>-lsb2msb</B>
|
|
|
|
<DD>
|
|
These flags control fill order (default is
|
|
<B>-msb2lsb</B>).
|
|
|
|
<DT id="7"><B>-rowsperstrip</B>
|
|
|
|
<DD>
|
|
This sets the number of rows in an image strip (data in the Tiff files
|
|
generated by this program is stored in strips - each strip is
|
|
compressed individually). The default gives a strip size of no more
|
|
than 8 kb.
|
|
<DT id="8"><B>-lowdotrange</B>,<B>-highdotrange</B>
|
|
|
|
<DD>
|
|
These options set tag values that may be useful for printers. They
|
|
have not been tested.
|
|
<DT id="9"><B>-knormal</B>,<B>-kremove</B>,<B>-konly</B>
|
|
|
|
<DD>
|
|
These options modify the values written to the Tiff file after the
|
|
conversion calculations (described below) are completed. They are
|
|
useful only for testing and debugging the code.
|
|
<P>
|
|
<B>-kremove</B>
|
|
|
|
sets the black (K) layer to zero while
|
|
<B>-konly</B>
|
|
|
|
sets all inks to the black value.
|
|
<DT id="10"><B>-default</B>,<B>-negative</B>
|
|
|
|
<DD>
|
|
<B>-negative</B>
|
|
|
|
selects a simple algorithm that generates a colour negative. None of
|
|
the following options apply to this algorithm, which is included as an
|
|
example in the source to help implementors of other conversions.
|
|
<B>-default</B>
|
|
|
|
is not needed, unless it is used to countermand a
|
|
<B>-negative</B>
|
|
|
|
on the same command line. The default conversion from RGB to CMYK can
|
|
be modified by altering the options listed below.
|
|
<P>
|
|
The CMYKTiff web site includes tests on the conversion parameters.
|
|
The test images illustrate the command line options in practice and
|
|
may make the following explanation clearer.
|
|
<DT id="11"><B>-theta</B><I> deg</I>
|
|
|
|
<DD>
|
|
The basic conversion from RGB to CMY uses C = 1-R, M = 1-G, Y = 1-B.
|
|
<B>-theta</B>
|
|
|
|
provides a simple correction for any colour bias that may occur in the
|
|
printed image because, in practice, inks do not exactly complement the
|
|
primary colours. It rotates the colours by the amount given
|
|
(<I>deg</I>)
|
|
|
|
in degrees. Unless you are trying to produce unusual effects you will
|
|
need to use small values (try generating three images at -10, 0 (the
|
|
default) and 10 degrees and seeing which has the best colour balance.
|
|
<DT id="12"><B>-gamma</B><I> n</I>
|
|
|
|
<DD>
|
|
The black (K) component of the image is calculated as min(C,Y,M).
|
|
<B>-gamma</B>
|
|
|
|
applies a gamma correction to this level. In other words, the final
|
|
black level is K (normalised to the range 0 to 1) raised to the
|
|
<I>n</I>th
|
|
|
|
power. In practice this means that a value greater than 1 makes the
|
|
image lighter and a value less than 1 makes the image darker. The
|
|
range of allowed values is 0.1 to 10.
|
|
<DT id="13"><B>-gammap</B><I> n</I>
|
|
|
|
<DD>
|
|
This option controls the removal of CMY under K. If
|
|
<I>n</I>
|
|
|
|
is -1 then no removal occurs and C, M, Y and K are calculated as
|
|
above. This means that, when printed, dark areas contain all four
|
|
inks, which can make high contrast areas, like lettering, appear
|
|
fuzzy.
|
|
<P>
|
|
By default, when
|
|
<B>-gammap</B>
|
|
|
|
is not given on the command line, the colours are reduced in dark
|
|
areas by subtracting the black level. The value subtracted is
|
|
calculated with the same gamma correction given by
|
|
<B>-gamma</B>.
|
|
|
|
Hopefully this will reduce fuzziness without changing the appearance
|
|
of the image significantly.
|
|
<P>
|
|
If
|
|
<B>-gammap</B><I> n</I>
|
|
|
|
is given, with n between 0.01 and 10, then black is still subtracted,
|
|
but the subtracted value is calculated using
|
|
<I>n</I>
|
|
|
|
rather than any value supplied with
|
|
<B>-gamma</B>.
|
|
|
|
For example, it may be best to only subtract black from the coloured
|
|
inks in the very darkest regions. In that case,
|
|
<I>n</I>
|
|
|
|
should be a large value, such as 5.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
This program is not self-contained. It must be used with NetPbm and
|
|
libtiff must be available (libtiff is included in the 1mar94 release
|
|
of NetPbm).
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+pnmtotiff">pnmtotiff</A>(1), <A HREF="/cgi-bin/man/man2html?1+tifftopnm">tifftopnm</A>(1), <A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A>(5)
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Copyright (c) 1999 Andrew Cooke (Jara Software). Released under the
|
|
GPL with no warranty. See source or COPYRIGHT and LICENCE files in
|
|
distribution for full details.
|
|
<P>
|
|
|
|
Much of the code (and man page!) uses ideas from other pnm programs,
|
|
written by Jef Poskanzer (thanks go to him and libtiff maintainer Sam
|
|
Leffler). A small section of the code - some of the tiff tag settings
|
|
- is derived directly from pnmtotiff, by Jef Poskanzer, which, in
|
|
turn, acknowledges Patrick Naughton with the following text:
|
|
<DL COMPACT>
|
|
<DT id="14"><DD>
|
|
Derived by Jef Poskanzer from ras2tif.c, which is:
|
|
<DT id="15"><DD>
|
|
Copyright (c) 1990 by Sun Microsystems, Inc.
|
|
<DT id="16"><DD>
|
|
Author: Patrick J. Naughton
|
|
<A HREF="mailto:naughton@wind.sun.com">naughton@wind.sun.com</A>
|
|
<DT id="17"><DD>
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
documentation for any purpose 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.
|
|
<DT id="18"><DD>
|
|
This file is provided AS IS with no warranties of any kind. The author
|
|
shall have no liability with respect to the infringement of copyrights,
|
|
trade secrets or any patents by this file or any part thereof. In no
|
|
event will the author be liable for any lost revenue or profits or
|
|
other special, indirect and consequential damages.
|
|
<P>
|
|
</DL>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="19"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="20"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="21"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="22"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="23"><A HREF="#lbAF">BUGS</A><DD>
|
|
<DT id="24"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="25"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:24 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|