@@ -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,9 @@ 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_ZSTD ||
668
+ wtiff -> compression == COMPRESSION_LZW ) &&
668
669
wtiff -> predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
669
670
TIFFSetField ( tif , TIFFTAG_PREDICTOR , wtiff -> predictor );
670
671
@@ -1866,6 +1867,12 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
1866
1867
TIFFSetField ( out , TIFFTAG_ZSTD_LEVEL , wtiff -> level );
1867
1868
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
1868
1869
1870
+ if ( (wtiff -> compression == COMPRESSION_ADOBE_DEFLATE ||
1871
+ wtiff -> compression == COMPRESSION_ZSTD ||
1872
+ wtiff -> compression == COMPRESSION_LZW ) &&
1873
+ wtiff -> predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
1874
+ TIFFSetField ( out , TIFFTAG_PREDICTOR , wtiff -> predictor );
1875
+
1869
1876
/* We can't copy profiles or xmp :( Set again from wtiff.
1870
1877
*/
1871
1878
if ( !wtiff -> strip )
0 commit comments