From efcc2ebb33efef540d21d8ab455382805c86f2fd Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Mon, 10 Sep 2007 20:01:18 +0000 Subject: [PATCH] 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 --- mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index f1b776e244c..e93e0031812 100644 --- a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -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();