Merge branch 'revise-premultiply' of github.com:libvips/libvips into revise-premultiply
This commit is contained in:
commit
6db234fae8
@ -9,6 +9,7 @@
|
|||||||
- fix a possible segv with very wide images [f1ac]
|
- fix a possible segv with very wide images [f1ac]
|
||||||
- revise premultiply, again [jjonesrs]
|
- revise premultiply, again [jjonesrs]
|
||||||
- revise profile handling in vipsthumbnail
|
- revise profile handling in vipsthumbnail
|
||||||
|
- fix tiff deflate predictor setting [Adios]
|
||||||
|
|
||||||
18/12/20 started 8.10.5
|
18/12/20 started 8.10.5
|
||||||
- fix potential /0 in animated webp load [lovell]
|
- fix potential /0 in animated webp load [lovell]
|
||||||
|
@ -590,8 +590,8 @@ vips_foreign_save_tiff_buffer_init( VipsForeignSaveTiffBuffer *buffer )
|
|||||||
* User @level to set the ZSTD compression level. Use @lossless to
|
* User @level to set the ZSTD compression level. Use @lossless to
|
||||||
* set WEBP lossless mode on. Use @Q to set the WEBP compression level.
|
* 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
|
* Use @predictor to set the predictor for lzw, deflate and zstd compression.
|
||||||
* defaults to #VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL, meaning horizontal
|
* It defaults to #VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL, meaning horizontal
|
||||||
* differencing. Please refer to the libtiff
|
* differencing. Please refer to the libtiff
|
||||||
* specifications for further discussion of various predictors.
|
* specifications for further discussion of various predictors.
|
||||||
*
|
*
|
||||||
|
@ -333,9 +333,9 @@ struct _Wtiff {
|
|||||||
VipsPel *tbuf; /* TIFF output buffer */
|
VipsPel *tbuf; /* TIFF output buffer */
|
||||||
int tls; /* Tile line size */
|
int tls; /* Tile line size */
|
||||||
|
|
||||||
int compression; /* Compression type */
|
int compression; /* libtiff compression type */
|
||||||
int Q; /* JPEG q-factor, webp level */
|
int Q; /* JPEG q-factor, webp level */
|
||||||
int predictor; /* Predictor value */
|
int predictor; /* libtiff predictor type */
|
||||||
int tile; /* Tile or not */
|
int tile; /* Tile or not */
|
||||||
int tilew, tileh; /* Tile size */
|
int tilew, tileh; /* Tile size */
|
||||||
int pyramid; /* Wtiff pyramid */
|
int pyramid; /* Wtiff pyramid */
|
||||||
@ -663,8 +663,9 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
|
|||||||
TIFFSetField( tif, TIFFTAG_ZSTD_LEVEL, wtiff->level );
|
TIFFSetField( tif, TIFFTAG_ZSTD_LEVEL, wtiff->level );
|
||||||
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
|
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
|
||||||
|
|
||||||
if( (wtiff->compression == VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE ||
|
if( (wtiff->compression == COMPRESSION_ADOBE_DEFLATE ||
|
||||||
wtiff->compression == VIPS_FOREIGN_TIFF_COMPRESSION_LZW) &&
|
wtiff->compression == COMPRESSION_ZSTD ||
|
||||||
|
wtiff->compression == COMPRESSION_LZW) &&
|
||||||
wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
|
wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
|
||||||
TIFFSetField( tif, TIFFTAG_PREDICTOR, wtiff->predictor );
|
TIFFSetField( tif, TIFFTAG_PREDICTOR, wtiff->predictor );
|
||||||
|
|
||||||
@ -1866,6 +1867,12 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
|
|||||||
TIFFSetField( out, TIFFTAG_ZSTD_LEVEL, wtiff->level );
|
TIFFSetField( out, TIFFTAG_ZSTD_LEVEL, wtiff->level );
|
||||||
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
|
#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 );
|
||||||
|
|
||||||
/* We can't copy profiles or xmp :( Set again from wtiff.
|
/* We can't copy profiles or xmp :( Set again from wtiff.
|
||||||
*/
|
*/
|
||||||
if( !wtiff->strip )
|
if( !wtiff->strip )
|
||||||
|
Loading…
Reference in New Issue
Block a user