diff options
-rw-r--r-- | converter/other/pnmtotiffcmyk.c | 9 | ||||
-rw-r--r-- | doc/HISTORY | 7 |
2 files changed, 10 insertions, 6 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/doc/HISTORY b/doc/HISTORY index 258d3744..51918f5a 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -13,6 +13,9 @@ not yet BJH Release 10.78.00 pnmtotiff: Fail with -miniswhite or -minisblack on color image rather than produce an invalid TIFF. + tifftopnmcmyk: Default rows per strip to the TIFF library + default instead of whatever yields 8K strips. + --version global option: with SOURCE_DATE_EPOCH environment variable, display source code datetime instead of build datetime. And when displaying build datetime, do it in the @@ -23,6 +26,10 @@ not yet BJH Release 10.78.00 can be represented as a C unsigned integer. Broken in Netpbm 10.11 (October 2002). + tifftopnmcmyk: Fix bug: fails with very wide images and no + -rowsperstrip. Always broken. (Tifftocmyk was new in Netpbm + 8.2 (March 2000). + svgtopam: Fix crash when out of memory. Always broken (svgtopam was new in Netpbm 10.33 (March 2006)). |