{
    "content": [
        {
            "type": "text",
            "text": "# pnmtotiffcmyk(1) (man)\n\n**Summary:** pnmtotiffcmyk - convert a portable anymap into a CMYK encoded TIFF file\n\n**Synopsis:** pnmtotiffcmyk [Compargs][Tiffargs][Convargs][ pnmfile ]\nCompargs:\n[-none|-packbits|-lzw [-predictor n]]\nTiffargs:\n[-msb2lsb|-lsb2msb] [-rowsperstrip n]\n[-lowdotrange n] [-highdotrange n]\n[-knormal|-konly|-kremove]\nConvargs:\n[[-default][Defargs]|-negative]\nDefargs:\n[-theta deg] [-gamma n] [-gammap -1|-gammap n]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | — | — | Tiff files can be compressed. By default LZW decompression is used, but (apparently) some readers cannot read this, so y |\n| — | — | — | These flags control fill order (default is -msb2lsb). |\n| — | — | — | This sets the number of rows in an image strip (data in the Tiff files generated by this program is stored in strips - e |\n| — | — | — | These options set tag values that may be useful for printers. They have not been tested. |\n| — | — | — | These options modify the values written to the Tiff file after the conversion calcula‐ tions (described below) are compl |\n| — | — | — | -negative selects a simple algorithm that generates a colour negative. None of the following options apply to this algor |\n| — | — | — | 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  |\n| — | — | — | The black (K) component of the image is calculated as min(C,Y,M). -gamma applies a gamma correction to this level. In ot |\n| — | — | — | 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 a |\n\n## See Also\n\n- pnmtotiff(1)\n- tifftopnm(1)\n- pnm(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (16 lines)\n- **DESCRIPTION** (3 lines)\n- **OPTIONS** (5 lines) — 9 subsections\n  - -none -packbits -lzw -predictor (5 lines)\n  - -msb2lsb -lsb2msb (2 lines)\n  - -rowsperstrip (4 lines)\n  - -lowdotrange -highdotrange (3 lines)\n  - -knormal -kremove -konly (7 lines)\n  - -default -negative (10 lines)\n  - -theta (7 lines)\n  - -gamma (6 lines)\n  - -gammap (15 lines)\n- **BUGS** (3 lines)\n- **SEE ALSO** (2 lines)\n- **AUTHOR** (27 lines)\n\n## Full Content\n\n### NAME\n\npnmtotiffcmyk - convert a portable anymap into a CMYK encoded TIFF file\n\n### SYNOPSIS\n\npnmtotiffcmyk [Compargs][Tiffargs][Convargs][ pnmfile ]\n\nCompargs:\n[-none|-packbits|-lzw [-predictor n]]\n\nTiffargs:\n[-msb2lsb|-lsb2msb] [-rowsperstrip n]\n[-lowdotrange n] [-highdotrange n]\n[-knormal|-konly|-kremove]\n\nConvargs:\n[[-default][Defargs]|-negative]\n\nDefargs:\n[-theta deg] [-gamma n] [-gammap -1|-gammap n]\n\n### DESCRIPTION\n\nReads  a  portable anymap as input.  Produces a CMYK encoded TIFF file as output.  Optionally\nmodifies the colour balance and black level, and removes CMY from under K.\n\n### OPTIONS\n\nThe order of most options is not important, but options for particular conversion  algorithms\nmust  appear  after  the  algorithm is selected (-default,-negative).  If no algorithm is se‐\nlected then -default is assumed and the appropriate options (-theta,-gamma,-gammap)  can  ap‐\npear anywhere.\n\n#### -none -packbits -lzw -predictor\n\nTiff  files can be compressed.  By default LZW decompression is used, but (apparently)\nsome readers cannot read this, so  you  may  want  to  select  a  different  algorithm\n(-none,-packbits).   For  LZW  compression,  a -predictor value of 2 forces horizontal\ndifferencing of scanlines before encoding; a value of 1 forces no differencing.\n\n#### -msb2lsb -lsb2msb\n\nThese flags control fill order (default is -msb2lsb).\n\n#### -rowsperstrip\n\nThis sets the number of rows in an image strip (data in the Tiff  files  generated  by\nthis  program  is  stored in strips - each strip is compressed individually).  The de‐\nfault gives a strip size of no more than 8 kb.\n\n#### -lowdotrange -highdotrange\n\nThese options set tag values that may be useful for  printers.   They  have  not  been\ntested.\n\n#### -knormal -kremove -konly\n\nThese options modify the values written to the Tiff file after the conversion calcula‐\ntions (described below) are completed.  They are useful only for testing and debugging\nthe code.\n\n-kremove  sets  the  black  (K)  layer to zero while -konly sets all inks to the black\nvalue.\n\n#### -default -negative\n\n-negative selects a simple algorithm that generates a colour negative.   None  of  the\nfollowing  options  apply  to  this  algorithm, which is included as an example in the\nsource to help implementors of other conversions.  -default is not needed,  unless  it\nis  used  to countermand a -negative on the same command line.  The default conversion\nfrom RGB to CMYK can be modified by altering the options listed below.\n\nThe CMYKTiff web site includes tests on the conversion parameters.   The  test  images\nillustrate the command line options in practice and may make the following explanation\nclearer.\n\n#### -theta\n\nThe basic conversion from RGB to CMY uses C = 1-R, M = 1-G, Y = 1-B.  -theta  provides\na  simple  correction for any colour bias that may occur in the printed image because,\nin practice, inks do not exactly complement  the  primary  colours.   It  rotates  the\ncolours  by  the  amount given (deg) in degrees.  Unless you are trying to produce un‐\nusual effects you will need to use small values (try generating three images at -10, 0\n(the default) and 10 degrees and seeing which has the best colour balance.\n\n#### -gamma\n\nThe  black  (K)  component of the image is calculated as min(C,Y,M).  -gamma applies a\ngamma correction to this level.  In other words, the final  black  level  is  K  (nor‐\nmalised  to  the range 0 to 1) raised to the nth power.  In practice this means that a\nvalue greater than 1 makes the image lighter and a value less than 1 makes  the  image\ndarker.  The range of allowed values is 0.1 to 10.\n\n#### -gammap\n\nThis  option  controls  the removal of CMY under K.  If n is -1 then no removal occurs\nand C, M, Y and K are calculated as above.  This means that, when printed, dark  areas\ncontain  all  four  inks,  which  can make high contrast areas, like lettering, appear\nfuzzy.\n\nBy default, when -gammap is not given on the command line, the colours are reduced  in\ndark  areas  by  subtracting the black level.  The value subtracted is calculated with\nthe same gamma correction given by -gamma.  Hopefully this will reduce fuzziness with‐\nout changing the appearance of the image significantly.\n\nIf -gammap n is given, with n between 0.01 and 10, then black is still subtracted, but\nthe subtracted value is calculated using n rather than any value supplied with -gamma.\nFor  example, it may be best to only subtract black from the coloured inks in the very\ndarkest regions.  In that case, n should be a large value, such as 5.\n\n### BUGS\n\nThis program is not self-contained.  It must be used with NetPbm and libtiff must  be  avail‐\nable (libtiff is included in the 1mar94 release of NetPbm).\n\n### SEE ALSO\n\npnmtotiff(1), tifftopnm(1), pnm(5)\n\n### AUTHOR\n\nCopyright  (c)  1999  Andrew Cooke (Jara Software).  Released under the GPL with no warranty.\nSee source or COPYRIGHT and LICENCE files in distribution for full details.\n\nMuch of the code (and man page!) uses ideas from other pnm programs, written by Jef Poskanzer\n(thanks go to him and libtiff maintainer Sam Leffler).  A small section of the code - some of\nthe tiff tag settings - is derived directly from pnmtotiff, by Jef Poskanzer, which, in turn,\nacknowledges Patrick Naughton with the following text:\n\nDerived by Jef Poskanzer from ras2tif.c, which is:\n\nCopyright (c) 1990 by Sun Microsystems, Inc.\n\nAuthor: Patrick J. Naughton naughton@wind.sun.com\n\nPermission  to  use,  copy, modify, and distribute this software and its documentation\nfor any purpose and without fee is hereby granted, provided that the  above  copyright\nnotice  appear  in  all copies and that both that copyright notice and this permission\nnotice appear in supporting documentation.\n\nThis file is provided AS IS with no warranties of any kind.  The author shall have  no\nliability with respect to the infringement of copyrights, trade secrets or any patents\nby this file or any part thereof.  In no event will the author be liable for any  lost\nrevenue or profits or other special, indirect and consequential damages.\n\n\n\n9 December 1999                          pnmtotiffcmyk(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "pnmtotiffcmyk",
        "section": "1",
        "mode": "man",
        "summary": "pnmtotiffcmyk - convert a portable anymap into a CMYK encoded TIFF file",
        "synopsis": "pnmtotiffcmyk [Compargs][Tiffargs][Convargs][ pnmfile ]\nCompargs:\n[-none|-packbits|-lzw [-predictor n]]\nTiffargs:\n[-msb2lsb|-lsb2msb] [-rowsperstrip n]\n[-lowdotrange n] [-highdotrange n]\n[-knormal|-konly|-kremove]\nConvargs:\n[[-default][Defargs]|-negative]\nDefargs:\n[-theta deg] [-gamma n] [-gammap -1|-gammap n]",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "These flags control fill order (default is -msb2lsb)."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "These options set tag values that may be useful for printers. They have not been tested."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "-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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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 nth 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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pnmtotiff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmtotiff/1/json"
            },
            {
                "name": "tifftopnm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/tifftopnm/1/json"
            },
            {
                "name": "pnm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "-none -packbits -lzw -predictor",
                        "lines": 5
                    },
                    {
                        "name": "-msb2lsb -lsb2msb",
                        "lines": 2
                    },
                    {
                        "name": "-rowsperstrip",
                        "lines": 4
                    },
                    {
                        "name": "-lowdotrange -highdotrange",
                        "lines": 3
                    },
                    {
                        "name": "-knormal -kremove -konly",
                        "lines": 7
                    },
                    {
                        "name": "-default -negative",
                        "lines": 10
                    },
                    {
                        "name": "-theta",
                        "lines": 7
                    },
                    {
                        "name": "-gamma",
                        "lines": 6
                    },
                    {
                        "name": "-gammap",
                        "lines": 15
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 27,
                "subsections": []
            }
        ]
    }
}