From c46a3a0ed406b3e67cea997acbae1035bbeff12a Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 26 Aug 2023 18:03:41 -0400 Subject: [PATCH] read unspecified extra samples (https://github.com/ImageMagick/ImageMagick6/issues/261) --- coders/tiff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index 6b41d75c9..fc163690d 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1622,18 +1622,19 @@ static Image *ReadTIFFImage(const ImageInfo *image_info, else for (i=0; i < extra_samples; i++) { + image->matte=MagickTrue; if (sample_info[i] == EXTRASAMPLE_ASSOCALPHA) { - image->matte=MagickTrue; SetQuantumAlphaType(quantum_info,AssociatedQuantumAlpha); (void) SetImageProperty(image,"tiff:alpha","associated"); + break; } else if (sample_info[i] == EXTRASAMPLE_UNASSALPHA) { - image->matte=MagickTrue; SetQuantumAlphaType(quantum_info,DisassociatedQuantumAlpha); (void) SetImageProperty(image,"tiff:alpha","unassociated"); + break; } } if (image->matte != MagickFalse)