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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user