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)