diff --git a/coders/tiff.c b/coders/tiff.c
index f31b630..b3c92d3 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -748,7 +748,6 @@
y;
MagickBooleanType
- associated_alpha,
debug,
status;
@@ -1055,7 +1054,6 @@
default:
break;
}
- associated_alpha=MagickFalse;
extra_samples=0;
(void) TIFFGetFieldDefaulted(tiff,TIFFTAG_EXTRASAMPLES,&extra_samples,
&sample_info);
@@ -1067,25 +1065,21 @@
else
for (i=0; i < extra_samples; i++)
{
+ image->matte=MagickTrue;
+ image->alpha_channel=UndefinedAlphaChannel;
+ (void) SetImageProperty(image,"tiff:alpha","undefined");
if (sample_info[i] == EXTRASAMPLE_UNASSALPHA)
{
- image->matte=MagickTrue;
- associated_alpha=MagickFalse;
+ image->alpha_channel=UnassociatedAlphaChannel;
+ (void) SetImageProperty(image,"tiff:alpha","unassociated");
}
if (sample_info[i] == EXTRASAMPLE_ASSOCALPHA)
{
- image->matte=MagickTrue;
- associated_alpha=MagickTrue;
+ image->alpha_channel=AssociatedAlphaChannel;
SetQuantumAlphaType(quantum_info,DisassociatedQuantumAlpha);
+ (void) SetImageProperty(image,"tiff:alpha","associated");
}
}
- option=GetImageOption(image_info,"tiff:alpha");
- if (option != (const char *) NULL)
- associated_alpha=LocaleCompare(option,"associated") == 0 ? MagickTrue :
- MagickFalse;
- if (image->matte != MagickFalse)
- (void) SetImageProperty(image,"tiff:alpha",
- associated_alpha != MagickFalse ? "associated" : "unassociated");
if ((photometric == PHOTOMETRIC_PALETTE) &&
(pow(2.0,1.0*bits_per_sample) <= MaxColormapSize))
{
@@ -1655,7 +1649,7 @@
MagickInfo
*entry;
-
+
if (tiff_semaphore == (SemaphoreInfo *) NULL)
tiff_semaphore=AllocateSemaphoreInfo();
LockSemaphoreInfo(tiff_semaphore);