@@ -333,9 +333,9 @@ struct _Wtiff {
333
333
VipsPel * tbuf ; /* TIFF output buffer */
334
334
int tls ; /* Tile line size */
335
335
336
- int compression ; /* Compression type */
336
+ int compression ; /* libtiff compression type */
337
337
int Q ; /* JPEG q-factor, webp level */
338
- int predictor ; /* Predictor value */
338
+ int predictor ; /* libtiff predictor type */
339
339
int tile ; /* Tile or not */
340
340
int tilew , tileh ; /* Tile size */
341
341
int pyramid ; /* Wtiff pyramid */
@@ -663,8 +663,8 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
663
663
TIFFSetField ( tif , TIFFTAG_ZSTD_LEVEL , wtiff -> level );
664
664
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
665
665
666
- if ( (wtiff -> compression == VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE ||
667
- wtiff -> compression == VIPS_FOREIGN_TIFF_COMPRESSION_LZW ) &&
666
+ if ( (wtiff -> compression == COMPRESSION_ADOBE_DEFLATE ||
667
+ wtiff -> compression == COMPRESSION_LZW ) &&
668
668
wtiff -> predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
669
669
TIFFSetField ( tif , TIFFTAG_PREDICTOR , wtiff -> predictor );
670
670
@@ -1866,6 +1866,11 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
1866
1866
TIFFSetField ( out , TIFFTAG_ZSTD_LEVEL , wtiff -> level );
1867
1867
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
1868
1868
1869
+ if ( (wtiff -> compression == COMPRESSION_ADOBE_DEFLATE ||
1870
+ wtiff -> compression == COMPRESSION_LZW ) &&
1871
+ wtiff -> predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
1872
+ TIFFSetField ( out , TIFFTAG_PREDICTOR , wtiff -> predictor );
1873
+
1869
1874
/* We can't copy profiles or xmp :( Set again from wtiff.
1870
1875
*/
1871
1876
if ( !wtiff -> strip )
0 commit comments