Added extra conditions for when ReadGenericMethod should be used when reading a jpeg compressed tiff file (dlemstra/Magick.NET/issues/2016)

This commit is contained in:
Dirk Lemstra
2026-05-11 19:28:33 +02:00
parent 7764e06718
commit 8a24b6aa26
+3 -1
View File
@@ -1744,7 +1744,9 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
{
if (photometric == PHOTOMETRIC_SEPARATED)
method=GetJPEGMethod(image,tiff,photometric,bits_per_sample);
else if (method != ReadStripMethod)
else if ((method != ReadStripMethod) ||
(compress_tag == COMPRESSION_OJPEG) ||
(photometric == PHOTOMETRIC_YCBCR))
method=ReadGenericMethod;
}
#if defined(WORDS_BIGENDIAN)