Merge branch '8.10' into revise-premultiply

This commit is contained in:
John Cupitt 2021-03-05 12:17:20 +00:00
commit a4d89b852a
2 changed files with 11 additions and 5 deletions

View File

@ -1084,7 +1084,7 @@ if test x"$with_tiff" != x"no"; then
)
fi
# WEBP in TIFF added in libtiff 4.0.10
# ZSTD and WEBP in TIFF added in libtiff 4.0.10
if test x"$with_tiff" != x"no"; then
save_INCLUDES="$INCLUDES"
INCLUDES="$INCLUDES $TIFF_INCLUDES"

View File

@ -659,12 +659,15 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
TIFFSetField( tif, TIFFTAG_WEBP_LEVEL, wtiff->Q );
TIFFSetField( tif, TIFFTAG_WEBP_LOSSLESS, wtiff->lossless );
}
if( wtiff->compression == COMPRESSION_ZSTD )
if( wtiff->compression == COMPRESSION_ZSTD ) {
TIFFSetField( tif, TIFFTAG_ZSTD_LEVEL, wtiff->level );
if( wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
TIFFSetField( tif,
TIFFTAG_PREDICTOR, wtiff->predictor );
}
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
if( (wtiff->compression == COMPRESSION_ADOBE_DEFLATE ||
wtiff->compression == COMPRESSION_ZSTD ||
wtiff->compression == COMPRESSION_LZW) &&
wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
TIFFSetField( tif, TIFFTAG_PREDICTOR, wtiff->predictor );
@ -1863,12 +1866,15 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
TIFFSetField( out, TIFFTAG_WEBP_LEVEL, wtiff->Q );
TIFFSetField( out, TIFFTAG_WEBP_LOSSLESS, wtiff->lossless );
}
if( wtiff->compression == COMPRESSION_ZSTD )
if( wtiff->compression == COMPRESSION_ZSTD ) {
TIFFSetField( out, TIFFTAG_ZSTD_LEVEL, wtiff->level );
if( wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
TIFFSetField( out,
TIFFTAG_PREDICTOR, wtiff->predictor );
}
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
if( (wtiff->compression == COMPRESSION_ADOBE_DEFLATE ||
wtiff->compression == COMPRESSION_ZSTD ||
wtiff->compression == COMPRESSION_LZW) &&
wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
TIFFSetField( out, TIFFTAG_PREDICTOR, wtiff->predictor );