.TL Pnmtotiffcmyk User Manual .SH 1 pnmtotiffcmyk .LP Updated: 07 February 2004 .br Table Of Contents .SH 2 NAME .LP pnmtotiffcmyk - convert a Netpbm image into a CMYK encoded TIFF file .SH 2 SYNOPSIS .LP \fBpnmtotiffcmyk \fR [\fICompargs\fR][\fITiffargs\fR][\fIConvargs\fR][\fIpnmfile\fR] .LP \fICompargs\fR: .LP [\fB-none\fR|\fB-packbits\fR|\fB-lzw\fR [\fB-predictor\fR \fIn\fR]] .LP \fITiffargs\fR: .LP [\fB-msb2lsb\fR|\fB-lsb2msb\fR] [\fB-rowsperstrip\fR \fIn\fR] .br [\fB-lowdotrange\fR \fIn\fR] [\fB-highdotrange\fR \fIn\fR] .br [\fB-knormal\fR|\fB-konly\fR|\fB-kremove\fR] .LP \fIConvargs\fR: .LP [[\fB-default\fR][\fBDefargs\fR]|\fB-negative\fR] .LP \fIDefargs\fR: .LP [\fB-theta\fR \fIdeg\fR] [\fB-gamma\fR \fIn\fR] [\fB-gammap\fR \fI-1\fR | \fB-gammap\fR \fIn\fR] .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpnmtotiffcmyk\fRreads a PNM image as input and produces a CMYK encoded TIFF file as output. It optionally modifies the color balance and black level, and modifies removal of CMY from under K. .SH 2 OPTIONS .LP .LP The order of most options is not important, but options for particular conversion algorithms must appear after the algorithm is selected (\fB-default\fR,\fB-negative\fR). If you don't select an algorithm, \fBpnmtotiffcmyk\fR assumes \fB-default\fR and the appropriate options (\fB-theta\fR,\fB-gamma\fR,\fB-gammap\fR) can appear anywhere. .SH 3 \fB-none\fR,\fB-packbits\fR,\fB-lzw\fR,\fB-predictor\fR .LP .LP Tiff files can be compressed. By default, \fBpnmtotiffcmyk\fR uses LZW decompression, but (apparently) some readers cannot read this, so you may want to select a different algorithm (\fB-none\fR,\fB-packbits\fR). For LZW compression, a \fB-predictor\fR value of 2 forces horizontal differencing of scanlines before encoding; a value of 1 forces no differencing. .SH 3 \fB-msb2lsb\fR,\fB-lsb2msb\fR .LP .LP These options control fill order (default is \fB-msb2lsb\fR). .SH 3 \fB-rowsperstrip\fR .LP .LP 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. .SH 3 \fB-lowdotrange\fR,\fB-highdotrange\fR .LP .LP These options set tag values that may be useful for printers. .SH 3 \fB-knormal\fR,\fB-kremove\fR,\fB-konly\fR .LP .LP These options control the calculation of the CMYK ink levels. They are useful only for testing and debugging the code. .LP \fB-kremove\fR sets the black (K) levels to zero while leaving the other ink levels as they would be if the black level were normal. .LP \fB-konly\fR sets all inks to the normal black value. .SH 3 \fB-default\fR,\fB-negative\fR .LP .LP These options control what ink levels \fBpnmtotiffcmyk\fR uses to represent each input color. .LP \fB-negative\fR selects a simple algorithm that generates a color negative. None of the following options apply to this algorithm. The algorithm is included as an example in the source code to help implementors of other conversions. .LP \fB-default\fR is not necessary, unless you have to countermand a \fB-negative\fR on the same command line. .LP The default conversion from RGB to CMYK is as follows: The basic values of the 3 pigments are C = 1-R, M = 1-G, Y = 1-B. From this, \fBpnmtotiffcmyk\fR chooses a black (K) level which is the minimum of those three. It then replaces that much of the 3 pigments with the black. I.e. it substracts K from each of the basic C, M, and Y values. .LP The options below modify this conversion. .SH 3 \fB-theta\fR \fIdeg\fR .LP .LP \fB-theta\fR provides a simple correction for any color bias that may occur in the printed image because, in practice, inks do not exactly complement the primary colors. It rotates the colors (before black replacement) by \fIdeg\fR degrees in the color wheel. 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 see which has the best color balance. .SH 3 \fB-gamma\fR \fIn\fR .LP .LP \fB-gamma\fR applies a gamma correction to the black (K) value described above. Specifically, instead of calculating the K value as min(C,M,Y), \fBpnmtotiffcmyk\fR raises that value (normalised to the range 0 to 1) to the \fIn\fRth 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. .SH 3 \fB-gammap\fR \fIn\fR .LP .LP This option controls the black replacement. .LP If you specify \fB-gammap\fR, \fBpnmtotiffcmyk\fR uses the specified gamma value in computing how much ink to remove from the 3 pigments, but still uses the regular gamma value (\fB-gamma\fR option) to generate the actual amount of black ink with which to replace it. .LP Values of \fIn\fR from 0.01 to 10 are valid. .LP For example, it may be best to only subtract black from the colored inks in the very darkest regions. In that case, \fIn\fR should be a large value, such as 5. .LP As a special case, if \fIn\fR is -1, \fBpnmtotiffcmyk\fR does not remove any pigment (but still adds the black ink). This means dark areas are even darker. Furthermore, when printed, dark areas contain a lot of ink which can make high contrast areas, like lettering, appear fuzzy. It's hard to see what the utility of this is. .SH 2 SEE ALSO .LP pnmtotiff, tifftopnm, pnm .SH 2 AUTHOR .LP 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. Much of the code uses ideas from other Netpbm 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: .LP Derived by Jef Poskanzer from ras2tif.c, which is: .LP Copyright (c) 1990 by Sun Microsystems, Inc. .LP Author: Patrick J. Naughton naughton@wind.sun.com .LP 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. .LP 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. .br \l'5i' .SH 2 Index .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu OPTIONS .IP \(bu SEE ALSO .IP \(bu AUTHOR .LP