# pnmtotiffcmyk(1) - man - phpMan

[pnmtotiffcmyk(1)](https://www.chedong.com/phpMan.php/man/pnmtotiffcmyk/1/markdown)                       General Commands Manual                      [pnmtotiffcmyk(1)](https://www.chedong.com/phpMan.php/man/pnmtotiffcmyk/1/markdown)



## NAME
       pnmtotiffcmyk - convert a portable anymap into a CMYK encoded TIFF file

## SYNOPSIS
       **pnmtotiffcmyk** [**Compargs**][**Tiffargs**][**Convargs**][ _pnmfile_ ]

       Compargs:
              [**-none**|**-packbits**|**-lzw** [**-predictor** _n_]]

       Tiffargs:
              [**-msb2lsb**|**-lsb2msb**] [**-rowsperstrip** _n_]
              [**-lowdotrange** _n_] [**-highdotrange** _n_]
              [**-knormal**|**-konly**|**-kremove**]

       Convargs:
              [[**-default**][**Defargs**]|**-negative**]

       Defargs:
              [**-theta** _deg_] [**-gamma** _n_] [**-gammap** _-1_|**-gammap** _n_]

## DESCRIPTION
       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.

## OPTIONS
       The order of most options is not important, but options for particular conversion  algorithms
       must  appear  after  the  algorithm is selected (**-default**,**-negative**).  If no algorithm is se‐
       lected then **-default** is assumed and the appropriate options (**-theta**,**-gamma**,**-gammap**)  can  ap‐
       pear anywhere.

### -none -packbits -lzw -predictor
              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
              (**-none**,**-packbits**).   For  LZW  compression,  a **-predictor** value of 2 forces horizontal
              differencing of scanlines before encoding; a value of 1 forces no differencing.

### -msb2lsb -lsb2msb
              These flags control fill order (default is **-msb2lsb**).

### -rowsperstrip
              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 de‐
              fault gives a strip size of no more than 8 kb.

### -lowdotrange -highdotrange
              These options set tag values that may be useful for  printers.   They  have  not  been
              tested.

### -knormal -kremove -konly
              These options modify the values written to the Tiff file after the conversion calcula‐
              tions (described below) are completed.  They are useful only for testing and debugging
              the code.

              **-kremove**  sets  the  black  (K)  layer to zero while **-konly** sets all inks to the black
              value.

### -default -negative
              **-negative** 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.  **-default** is not needed,  unless  it
              is  used  to countermand a **-negative** on the same command line.  The default conversion
              from RGB to CMYK can be modified by altering the options listed below.

              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.

### -theta
              The basic conversion from RGB to CMY uses C = 1-R, M = 1-G, Y = 1-B.  **-theta**  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 (_deg_) in degrees.  Unless you are trying to produce un‐
              usual 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.

### -gamma
              The  black  (K)  component of the image is calculated as min(C,Y,M).  **-gamma** applies a
              gamma correction to this level.  In other words, the final  black  level  is  K  (nor‐
              malised  to  the range 0 to 1) raised to the _n_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.

### -gammap
              This  option  controls  the removal of CMY under K.  If _n_ 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.

              By default, when **-gammap** 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 **-gamma**.  Hopefully this will reduce fuzziness with‐
              out changing the appearance of the image significantly.

              If **-gammap** _n_ is given, with n between 0.01 and 10, then black is still subtracted, but
              the subtracted value is calculated using _n_ rather than any value supplied with **-gamma**.
              For  example, it may be best to only subtract black from the coloured inks in the very
              darkest regions.  In that case, _n_ should be a large value, such as 5.

## BUGS
       This program is not self-contained.  It must be used with NetPbm and libtiff must  be  avail‐
       able (libtiff is included in the 1mar94 release of NetPbm).

## SEE ALSO
       [pnmtotiff(1)](https://www.chedong.com/phpMan.php/man/pnmtotiff/1/markdown), [tifftopnm(1)](https://www.chedong.com/phpMan.php/man/tifftopnm/1/markdown), [pnm(5)](https://www.chedong.com/phpMan.php/man/pnm/5/markdown)

## AUTHOR
       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 (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:

              Derived by Jef Poskanzer from ras2tif.c, which is:

              Copyright (c) 1990 by Sun Microsystems, Inc.

              Author: Patrick J. Naughton <naughton@wind.sun.com>

              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.

              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.



                                           9 December 1999                          [pnmtotiffcmyk(1)](https://www.chedong.com/phpMan.php/man/pnmtotiffcmyk/1/markdown)
