% July 1992 %
% %
% %
-% Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
image=AcquireImage(image_info,exception);
if ((image->columns == 0) || (image->rows == 0))
ThrowReaderException(OptionError,"MustSpecifyImageSize");
- image->colorspace=sRGBColorspace;
if (image_info->interlace != PartitionInterlace)
{
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (LocaleCompare(image_info->magick,"RGBA") == 0)
{
quantum_type=RGBAQuantum;
- image->matte=MagickTrue;
+ image->alpha_trait=BlendPixelTrait;
+ canvas_image->alpha_trait=BlendPixelTrait;
}
if (LocaleCompare(image_info->magick,"RGBO") == 0)
{
quantum_type=RGBOQuantum;
- image->matte=MagickTrue;
+ canvas_image->alpha_trait=BlendPixelTrait;
}
if (image_info->number_scenes != 0)
while (image->scene < image_info->scene)
if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))
if (image->scene >= (image_info->scene+image_info->number_scenes-1))
break;
- image->colorspace=sRGBColorspace;
switch (image_info->interlace)
{
case NoInterlace:
SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
SetPixelAlpha(image,OpaqueAlpha,q);
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
p+=GetPixelChannels(canvas_image);
q+=GetPixelChannels(image);
"UnexpectedEndOfFile",image->filename);
break;
}
- for (i=0; i < (ssize_t) (image->matte != MagickFalse ? 4 : 3); i++)
+ for (i=0; i < (ssize_t) (image->alpha_trait == BlendPixelTrait ? 4 : 3); i++)
{
quantum_type=quantum_types[i];
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
if (status == MagickFalse)
break;
}
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
{
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (status == MagickFalse)
break;
}
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
{
(void) CloseBlob(image);
AppendImageFormat("A",image->filename);
0,canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const Quantum *) NULL) ||
- (q == (Quantum *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
% o exception: return any errors or warnings in this structure.
%
*/
-static MagickBooleanType WriteRGBImage(const ImageInfo *image_info,Image *image,
- ExceptionInfo *exception)
+static MagickBooleanType WriteRGBImage(const ImageInfo *image_info,
+ Image *image,ExceptionInfo *exception)
{
MagickBooleanType
status;
}
quantum_type=RGBQuantum;
if (LocaleCompare(image_info->magick,"RGBA") == 0)
- {
- quantum_type=RGBAQuantum;
- if (image->matte == MagickFalse)
- SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
- }
+ quantum_type=RGBAQuantum;
if (LocaleCompare(image_info->magick,"RGBO") == 0)
- {
- quantum_type=RGBOQuantum;
- if (image->matte == MagickFalse)
- SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
- }
+ quantum_type=RGBOQuantum;
scene=0;
do
{
/*
Convert MIFF to RGB raster pixels.
*/
- if (IssRGBColorspace(image->colorspace) == MagickFalse)
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
(void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((LocaleCompare(image_info->magick,"RGBA") == 0) &&
- (image->matte == MagickFalse))
+ (image->alpha_trait != BlendPixelTrait))
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
if (status == MagickFalse)
break;
}
- (void) CloseBlob(image);
if (quantum_type == RGBAQuantum)
{
(void) CloseBlob(image);