rgba codec mishandles images without alpha channel
Posted: 2012-05-07T11:56:49-07:00
http://trac.imagemagick.org/browser/Ima ... gb.c#L1111
This second `if` will never fire, because `image->matte` is set to true above without initializing the alpha channel. The result is an rgba file with seeming garbage in the alpha channel.
This appears to have been fixed in 7, but it still affects 6.7.6.
Code: Select all
if (LocaleCompare(image_info->magick,"RGBA") == 0)
{
quantum_type=RGBAQuantum;
image->matte=MagickTrue;
}
// ...
do
{
if ((LocaleCompare(image_info->magick,"RGBA") == 0) &&
(image->matte == MagickFalse))
(void) SetImageAlphaChannel(image,ResetAlphaChannel);
This appears to have been fixed in 7, but it still affects 6.7.6.