fix tiff deflate predictor setting
the enums were mixed up, thanks Adios see https://github.com/libvips/libvips/issues/2128
This commit is contained in:
parent
ec67002493
commit
86a6fd9d18
@ -7,6 +7,7 @@
|
||||
- fix includes of glib headers in C++ [lovell]
|
||||
- fix build with more modern librsvg [lovell]
|
||||
- fix a possible segv with very wide images [f1ac]
|
||||
- fix tiff deflate predictor setting [Adios]
|
||||
|
||||
18/12/20 started 8.10.5
|
||||
- fix potential /0 in animated webp load [lovell]
|
||||
|
@ -333,9 +333,9 @@ struct _Wtiff {
|
||||
VipsPel *tbuf; /* TIFF output buffer */
|
||||
int tls; /* Tile line size */
|
||||
|
||||
int compression; /* Compression type */
|
||||
int compression; /* libtiff compression type */
|
||||
int Q; /* JPEG q-factor, webp level */
|
||||
int predictor; /* Predictor value */
|
||||
int predictor; /* libtiff predictor type */
|
||||
int tile; /* Tile or not */
|
||||
int tilew, tileh; /* Tile size */
|
||||
int pyramid; /* Wtiff pyramid */
|
||||
@ -663,8 +663,8 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
|
||||
TIFFSetField( tif, TIFFTAG_ZSTD_LEVEL, wtiff->level );
|
||||
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
|
||||
|
||||
if( (wtiff->compression == VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE ||
|
||||
wtiff->compression == VIPS_FOREIGN_TIFF_COMPRESSION_LZW) &&
|
||||
if( (wtiff->compression == COMPRESSION_ADOBE_DEFLATE ||
|
||||
wtiff->compression == COMPRESSION_LZW) &&
|
||||
wtiff->predictor != VIPS_FOREIGN_TIFF_PREDICTOR_NONE )
|
||||
TIFFSetField( tif, TIFFTAG_PREDICTOR, wtiff->predictor );
|
||||
|
||||
@ -1866,6 +1866,11 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
|
||||
TIFFSetField( out, TIFFTAG_ZSTD_LEVEL, wtiff->level );
|
||||
#endif /*HAVE_TIFF_COMPRESSION_WEBP*/
|
||||
|
||||
if( (wtiff->compression == COMPRESSION_ADOBE_DEFLATE ||
|
||||
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.
|
||||
*/
|
||||
if( !wtiff->strip )
|
||||
|
Loading…
x
Reference in New Issue
Block a user