Merge pull request #2129 from Adios/8.10-add-tiff-zstd-predictor
Add tiff zstd predictor support
This commit is contained in:
commit
4eb3c86045
@ -590,8 +590,8 @@ vips_foreign_save_tiff_buffer_init( VipsForeignSaveTiffBuffer *buffer )
|
||||
* User @level to set the ZSTD compression level. Use @lossless to
|
||||
* set WEBP lossless mode on. Use @Q to set the WEBP compression level.
|
||||
*
|
||||
* Use @predictor to set the predictor for lzw and deflate compression. It
|
||||
* defaults to #VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL, meaning horizontal
|
||||
* Use @predictor to set the predictor for lzw, deflate and zstd compression.
|
||||
* It defaults to #VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL, meaning horizontal
|
||||
* differencing. Please refer to the libtiff
|
||||
* specifications for further discussion of various predictors.
|
||||
*
|
||||
|
@ -659,8 +659,13 @@ 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 ||
|
||||
@ -1862,8 +1867,13 @@ 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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user