set EXTRASAMPLES on tiff pyr layers

we were not copying EXTRASAMPLES when copying pyr layers
This commit is contained in:
John Cupitt 2018-07-02 08:32:14 +01:00
parent 10c4831a70
commit d756705929
1 changed files with 5 additions and 2 deletions

View File

@ -176,6 +176,8 @@
* 24/10/17 * 24/10/17
* - no error on page-height not a factor of image height, just don't * - no error on page-height not a factor of image height, just don't
* write multipage * write multipage
* 2/7/18
* - copy EXTRASAMPLES to pyramid layers
*/ */
/* /*
@ -1566,6 +1568,7 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
tdata_t buf; tdata_t buf;
ttile_t tile; ttile_t tile;
ttile_t n; ttile_t n;
uint16 *a;
/* All the fields we might have set. /* All the fields we might have set.
*/ */
@ -1586,8 +1589,8 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
CopyField( TIFFTAG_ROWSPERSTRIP, i32 ); CopyField( TIFFTAG_ROWSPERSTRIP, i32 );
CopyField( TIFFTAG_SUBFILETYPE, i32 ); CopyField( TIFFTAG_SUBFILETYPE, i32 );
if( wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE ) if( TIFFGetField( in, TIFFTAG_EXTRASAMPLES, &i16, &a ) )
TIFFSetField( out, TIFFTAG_PREDICTOR, wtiff->predictor ); TIFFSetField( out, TIFFTAG_EXTRASAMPLES, i16, a );
/* TIFFTAG_JPEGQUALITY is a pesudo-tag, so we can't copy it. /* TIFFTAG_JPEGQUALITY is a pesudo-tag, so we can't copy it.
* Set explicitly from Wtiff. * Set explicitly from Wtiff.