Bug 391266 - png files with tRNS chunk displaying incorrectly with

color management.  r=pavlov, a=dsicore


git-svn-id: svn://10.0.0.236/trunk@235465 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tor%cs.brown.edu
2007-09-10 20:01:18 +00:00
parent 619f5a17a9
commit efcc2ebb33

View File

@@ -437,7 +437,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr)
if (decoder->mInProfile && gfxPlatform::GetCMSOutputProfile()) {
PRUint32 outType;
if (color_type & PNG_COLOR_MASK_ALPHA || trans)
if (color_type & PNG_COLOR_MASK_ALPHA || num_trans)
outType = TYPE_RGBA_8;
else
outType = TYPE_RGB_8;
@@ -453,7 +453,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr)
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb(png_ptr);
if (gfxPlatform::IsCMSEnabled()) {
if (color_type & PNG_COLOR_MASK_ALPHA || trans)
if (color_type & PNG_COLOR_MASK_ALPHA || num_trans)
decoder->mTransform = gfxPlatform::GetCMSRGBATransform();
else
decoder->mTransform = gfxPlatform::GetCMSRGBTransform();