| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pnmtotiffcmyk User Manual" 1 "21 March 2017" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
|
| 10 |
pnmtotiffcmyk - convert a Netpbm image into a CMYK encoded TIFF file |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
|
| 15 |
\fBpnmtotiffcmyk \fP |
| 16 |
[\fB-none\fP|\fB-packbits\fP|\fB-lzw\fP] |
| 17 |
[\fB-predictor\fP \fIn\fP] |
| 18 |
[\fB-msb2lsb\fP|\fB-lsb2msb\fP] |
| 19 |
[\fB-rowsperstrip\fP \fIn\fP] |
| 20 |
[\fB-lowdotrange\fP \fIn\fP] |
| 21 |
[\fB-highdotrange\fP \fIn\fP] |
| 22 |
[\fB-knormal\fP|\fB-konly\fP|\fB-kremove\fP] |
| 23 |
[[\fB-default\fP] |
| 24 |
[\fB-theta\fP \fIdeg\fP] |
| 25 |
[\fB-gamma\fP \fIn\fP] |
| 26 |
[\fB-gammap\fP \fIn\fP] |
| 27 |
[\fB-negative\fP] |
| 28 |
|
| 29 |
.UN description |
| 30 |
.SH DESCRIPTION |
| 31 |
.PP |
| 32 |
This program is part of |
| 33 |
.BR "Netpbm" (1)\c |
| 34 |
\&. |
| 35 |
.PP |
| 36 |
\fBpnmtotiffcmyk\fPreads a PNM image as input and produces a CMYK |
| 37 |
encoded TIFF file as output. It optionally modifies the color |
| 38 |
balance and black level, and modifies removal of CMY from under K. |
| 39 |
.PP |
| 40 |
Output is to Standard Output, but unlike with most Netpbm programs, |
| 41 |
Standard Output must be a seekable file. An ordinary file is fine, but you |
| 42 |
cannot pipe the output to another program. Furthermore, the program replaces |
| 43 |
any content currently in the file even if it was opened for appending. |
| 44 |
.PP |
| 45 |
\fBpamtotiff\fP generates many other kinds of TIFF files. |
| 46 |
|
| 47 |
|
| 48 |
.UN options |
| 49 |
.SH OPTIONS |
| 50 |
.PP |
| 51 |
In addition to the options common to all programs based on libnetpbm |
| 52 |
(most notably \fB-quiet\fP, see |
| 53 |
.UR index.html#commonoptions |
| 54 |
Common Options |
| 55 |
.UE |
| 56 |
\&), \fBpnmtotiffcmyk\fP recognizes the following |
| 57 |
command line options: |
| 58 |
.PP |
| 59 |
The order of most options is not important, but options for particular |
| 60 |
conversion algorithms must appear after the algorithm is selected |
| 61 |
(\fB-default\fP,\fB-negative\fP). If you don't select an algorithm, |
| 62 |
\fBpnmtotiffcmyk\fP assumes \fB-default\fP and the appropriate |
| 63 |
options (\fB-theta\fP,\fB-gamma\fP,\fB-gammap\fP) can appear |
| 64 |
anywhere. |
| 65 |
|
| 66 |
.SS \fB-none\fP,\fB-packbits\fP,\fB-lzw\fP,\fB-predictor\fP |
| 67 |
.PP |
| 68 |
Tiff files can be compressed. By default, \fBpnmtotiffcmyk\fP |
| 69 |
uses LZW decompression, but (apparently) some readers cannot read |
| 70 |
this, so you may want to select a different algorithm |
| 71 |
(\fB-none\fP,\fB-packbits\fP). For LZW compression, a |
| 72 |
\fB-predictor\fP value of 2 forces horizontal differencing of |
| 73 |
scanlines before encoding; a value of 1 forces no differencing. |
| 74 |
|
| 75 |
.SS \fB-msb2lsb\fP,\fB-lsb2msb\fP |
| 76 |
.PP |
| 77 |
These options control fill order (default is \fB-msb2lsb\fP). |
| 78 |
|
| 79 |
.SS \fB-rowsperstrip\fP |
| 80 |
.PP |
| 81 |
This sets the number of rows in an image strip (data in the Tiff |
| 82 |
files generated by this program is stored in strips - each strip is |
| 83 |
compressed individually). The default gives a strip size of no more |
| 84 |
than 8 kb. |
| 85 |
|
| 86 |
.SS \fB-lowdotrange\fP,\fB-highdotrange\fP |
| 87 |
.PP |
| 88 |
These options set tag values that may be useful for printers. |
| 89 |
|
| 90 |
.SS \fB-knormal\fP,\fB-kremove\fP,\fB-konly\fP |
| 91 |
.PP |
| 92 |
These options control the calculation of the CMYK ink levels. |
| 93 |
They are useful only for testing and debugging the code. |
| 94 |
.PP |
| 95 |
\fB-kremove\fP sets the black (K) levels to zero while leaving the |
| 96 |
other ink levels as they would be if the black level were normal. |
| 97 |
.PP |
| 98 |
\fB-konly\fP sets all inks to the normal black value. |
| 99 |
|
| 100 |
.SS \fB-default\fP,\fB-negative\fP |
| 101 |
.PP |
| 102 |
These options control what ink levels \fBpnmtotiffcmyk\fP uses to |
| 103 |
represent each input color. |
| 104 |
.PP |
| 105 |
\fB-negative\fP selects a simple algorithm that generates a color |
| 106 |
negative. None of the following options apply to this algorithm. The |
| 107 |
algorithm is included as an example in the source code to help |
| 108 |
implementors of other conversions. |
| 109 |
.PP |
| 110 |
\fB-default\fP is not necessary, unless you have to countermand a |
| 111 |
\fB-negative\fP on the same command line. |
| 112 |
.PP |
| 113 |
The default conversion from RGB to CMYK is as follows: The basic |
| 114 |
values of the 3 pigments are C = 1-R, M = 1-G, Y = 1-B. From this, |
| 115 |
\fBpnmtotiffcmyk\fP chooses a black (K) level which is the minimum of |
| 116 |
those three. It then replaces that much of the 3 pigments with the |
| 117 |
black. I.e. it subtracts K from each of the basic C, M, and Y |
| 118 |
values. |
| 119 |
.PP |
| 120 |
The options below modify this conversion. |
| 121 |
|
| 122 |
.SS \fB-theta\fP \fIdeg\fP |
| 123 |
.PP |
| 124 |
\fB-theta\fP provides a simple correction for any color bias that |
| 125 |
may occur in the printed image because, in practice, inks do not |
| 126 |
exactly complement the primary colors. It rotates the colors (before |
| 127 |
black replacement) by \fIdeg\fP degrees in the color wheel. Unless |
| 128 |
you are trying to produce unusual effects you will need to use small |
| 129 |
values. Try generating three images at -10, 0 (the default) and 10 |
| 130 |
degrees and see which has the best color balance. |
| 131 |
|
| 132 |
.SS \fB-gamma\fP \fIn\fP |
| 133 |
.PP |
| 134 |
\fB-gamma\fP applies a gamma correction to the black (K) value |
| 135 |
described above. Specifically, instead of calculating the K value as |
| 136 |
min(C,M,Y), \fBpnmtotiffcmyk\fP raises that value (normalised to the |
| 137 |
range 0 to 1) to the \fIn\fPth power. In practice, this means that a |
| 138 |
value greater than 1 makes the image lighter and a value less than 1 |
| 139 |
makes the image darker. The range of allowed values is 0.1 to 10. |
| 140 |
|
| 141 |
.SS \fB-gammap\fP \fIn\fP |
| 142 |
.PP |
| 143 |
This option controls the black replacement. |
| 144 |
.PP |
| 145 |
If you specify \fB-gammap\fP, \fBpnmtotiffcmyk\fP uses the specified |
| 146 |
gamma value in computing how much ink to remove from the 3 pigments, but |
| 147 |
still uses the regular gamma value (\fB-gamma\fP option) to generate the |
| 148 |
actual amount of black ink with which to replace it. |
| 149 |
.PP |
| 150 |
Values of \fIn\fP from 0.01 to 10 are valid. |
| 151 |
.PP |
| 152 |
For example, it may be best to only subtract black from the |
| 153 |
colored inks in the very darkest regions. In that case, \fIn\fP |
| 154 |
should be a large value, such as 5. |
| 155 |
.PP |
| 156 |
As a special case, if \fIn\fP is -1, \fBpnmtotiffcmyk\fP does not |
| 157 |
remove any pigment (but still adds the black ink). This means dark |
| 158 |
areas are even darker. Furthermore, when printed, dark areas contain |
| 159 |
a lot of ink which can make high contrast areas, like lettering, |
| 160 |
appear fuzzy. It's hard to see what the utility of this is. |
| 161 |
|
| 162 |
.UN seealso |
| 163 |
.SH SEE ALSO |
| 164 |
.BR "pamtotiff" (1)\c |
| 165 |
\&, |
| 166 |
.BR "tifftopnm" (1)\c |
| 167 |
\&, |
| 168 |
.BR "pnm" (1)\c |
| 169 |
\& |
| 170 |
|
| 171 |
.UN author |
| 172 |
.SH AUTHOR |
| 173 |
|
| 174 |
Copyright (c) 1999 Andrew Cooke (Jara Software). Released under the |
| 175 |
GPL with no warranty. See source or COPYRIGHT and LICENCE files in |
| 176 |
distribution for full details. |
| 177 |
|
| 178 |
Much of the code uses ideas from other Netpbm programs, written by Jef |
| 179 |
Poskanzer (thanks go to him and libtiff maintainer Sam Leffler). A |
| 180 |
small section of the code - some of the tiff tag settings - is derived |
| 181 |
directly from pnmtotiff, by Jef Poskanzer, which, in turn, |
| 182 |
acknowledges Patrick Naughton with the following text: |
| 183 |
|
| 184 |
.RS |
| 185 |
.PP |
| 186 |
Derived by Jef Poskanzer from ras2tif.c, which is: |
| 187 |
.PP |
| 188 |
Copyright (c) 1990 by Sun Microsystems, Inc. |
| 189 |
.PP |
| 190 |
Author: Patrick J. Naughton |
| 191 |
\[email protected]\fP |
| 192 |
.PP |
| 193 |
Permission to use, copy, modify, and distribute this software and |
| 194 |
its documentation for any purpose and without fee is hereby granted, |
| 195 |
provided that the above copyright notice appear in all copies and that |
| 196 |
both that copyright notice and this permission notice appear in |
| 197 |
supporting documentation. |
| 198 |
.PP |
| 199 |
This file is provided AS IS with no warranties of any kind. The |
| 200 |
author shall have no liability with respect to the infringement of |
| 201 |
copyrights, trade secrets or any patents by this file or any part |
| 202 |
thereof. In no event will the author be liable for any lost revenue |
| 203 |
or profits or other special, indirect and consequential damages. |
| 204 |
|
| 205 |
.RE |
| 206 |
.SH DOCUMENT SOURCE |
| 207 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 208 |
source. The master documentation is at |
| 209 |
.IP |
| 210 |
.B http://netpbm.sourceforge.net/doc/pnmtotiffcmyk.html |
| 211 |
.PP |