From 40c2a89f3a6756d8a75cba9715a89fa199ba9bab Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Mon, 24 Sep 2007 21:45:10 +0000 Subject: [PATCH] Bug 395170 - with color managment on, grayscale pngs displaying incorrectly. r=vlad, a=pavlov git-svn-id: svn://10.0.0.236/trunk@236575 18797224-902f-48f8-a5cc-f745e15eee43 --- .../modules/libpr0n/decoders/png/nsPNGDecoder.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index e93e0031812..69feefa4558 100644 --- a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -476,20 +476,6 @@ info_callback(png_structp png_ptr, png_infop info_ptr) png_set_gamma(png_ptr, 2.2, 0.45455); } - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - if (png_get_gAMA(png_ptr, info_ptr, &aGamma)) { - if ((aGamma <= 0.0) || (aGamma > 21474.83)) { - aGamma = 0.45455; - png_set_gAMA(png_ptr, info_ptr, aGamma); - } - png_set_gamma(png_ptr, 2.2, aGamma); - } - else - png_set_gamma(png_ptr, 2.2, 0.45455); - /* let libpng expand interlaced images */ if (interlace_type == PNG_INTERLACE_ADAM7) { /* number_passes = */