diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-03-28 01:47:12 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-03-28 01:47:12 +0000 |
commit | 82e30079f96ae1c131c5142b699dc3a2f9432fee (patch) | |
tree | d1133fce20801e5c0c9c2a79850d254834098c15 /converter | |
parent | 248dc249bb616696380855714b2335079db32b9c (diff) | |
download | netpbm-mirror-82e30079f96ae1c131c5142b699dc3a2f9432fee.tar.gz netpbm-mirror-82e30079f96ae1c131c5142b699dc3a2f9432fee.tar.xz netpbm-mirror-82e30079f96ae1c131c5142b699dc3a2f9432fee.zip |
Release 10.73.08
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2927 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pnmtotiffcmyk.c | 9 | ||||
-rw-r--r-- | converter/other/tifftopnm.c | 7 |
2 files changed, 3 insertions, 13 deletions
diff --git a/converter/other/pnmtotiffcmyk.c b/converter/other/pnmtotiffcmyk.c index 2e6ae935..b7e3228e 100644 --- a/converter/other/pnmtotiffcmyk.c +++ b/converter/other/pnmtotiffcmyk.c @@ -540,7 +540,6 @@ tiffOpen( Out* out, Root *r ) { short samplesperpixel = 4 ; /* cmyk has four values */ uint16 bitspersample = MAXTIFFBITS ; short photometric = PHOTOMETRIC_SEPARATED ; /* ie cmyk */ - int bytesperrow = r->nCols ; t->tiff = TIFFFdOpen( 1, "Standard Output", "w" ) ; if ( ! t->tiff ) { @@ -548,11 +547,6 @@ tiffOpen( Out* out, Root *r ) { return ERR_TIFF ; } - /* from pnmtotiff - default is to have 8kb strips */ - if ( ! t->rowsperstrip ) { - t->rowsperstrip = ( 8 * 1024 ) / bytesperrow ; - } - TIFFSetField( t->tiff, TIFFTAG_DOTRANGE, t->lowdotrange, t->highdotrange ) ; TIFFSetField( t->tiff, TIFFTAG_IMAGEWIDTH, (uint32)r->nCols ) ; TIFFSetField( t->tiff, TIFFTAG_IMAGELENGTH, (uint32)r->nRows ) ; @@ -567,6 +561,9 @@ tiffOpen( Out* out, Root *r ) { TIFFSetField( t->tiff, TIFFTAG_DOCUMENTNAME, r->name ) ; TIFFSetField( t->tiff, TIFFTAG_IMAGEDESCRIPTION, "PNM -> CMYK tiff" ) ; TIFFSetField( t->tiff, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel ) ; + if ( t->rowsperstrip == 0) { + t->rowsperstrip = TIFFDefaultStripSize(t->tiff, 0) ; + } TIFFSetField( t->tiff, TIFFTAG_ROWSPERSTRIP, t->rowsperstrip ) ; TIFFSetField( t->tiff, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG ) ; diff --git a/converter/other/tifftopnm.c b/converter/other/tifftopnm.c index b112aa82..4a8cf902 100644 --- a/converter/other/tifftopnm.c +++ b/converter/other/tifftopnm.c @@ -545,12 +545,6 @@ analyzeImageType(TIFF * const tif, bool grayscale; - if (bps == 1 && spp == 1) { - if (cmdline.headerdump) - pm_message("bilevel"); - grayscale = TRUE; - *maxvalP = 1; - } else { /* How come we don't deal with the photometric for the monochrome case (make sure it's one we know)? -Bryan 00.03.04 */ @@ -656,7 +650,6 @@ analyzeImageType(TIFF * const tif, default: pm_error("unknown photometric: %d", photomet); } - } if (*maxvalP > PNM_OVERALLMAXVAL) pm_error("bits/sample (%d) in the input image is too large.", bps); |