Merge branch 'issue-158-no-predictor-in-webp' into 'master'
TIFFTAG_PREDICTOR is not supported for WebP Closes #158 See merge request libtiff/libtiff!119
This commit is contained in:
commit
84b8b9a3e7
@ -1236,10 +1236,6 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
|
||||
if (tag == TIFFTAG_LERC_PARAMETERS)
|
||||
return 1;
|
||||
break;
|
||||
case COMPRESSION_WEBP:
|
||||
if (tag == TIFFTAG_PREDICTOR)
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -741,11 +741,12 @@ tiffcp(TIFF* in, TIFF* out)
|
||||
case COMPRESSION_DEFLATE:
|
||||
case COMPRESSION_LZMA:
|
||||
case COMPRESSION_ZSTD:
|
||||
case COMPRESSION_WEBP:
|
||||
if (predictor != (uint16)-1)
|
||||
TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
|
||||
else
|
||||
CopyField(TIFFTAG_PREDICTOR, predictor);
|
||||
/*fallthrough*/
|
||||
case COMPRESSION_WEBP:
|
||||
if (preset != -1) {
|
||||
if (compression == COMPRESSION_ADOBE_DEFLATE
|
||||
|| compression == COMPRESSION_DEFLATE)
|
||||
|
Loading…
Reference in New Issue
Block a user