Closed Bug 506741 Opened 16 years ago Closed 14 years ago

PNG images without gamma are rendered much darker when color profiles are enabled

Categories

(Core :: Graphics: Color Management, defect)

1.9.1 Branch
x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: spamg, Unassigned)

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 If a PNG is saved without gamma information (which Firefox 3.5 uses to adjust how photos are rendered on-screen), Firefox still attempts to correct the image's brightness. Reproducible: Always Steps to Reproduce: 1. Create a PNG image without gamma information (can be done via Gimp or a PNG-shrinking tool). 2. Ensure that gfx.color_management.mode in about:config is set to 2. 3. Open the image in Firefox. Actual Results: The image is rendered noticeably darker than what it should look like. Expected Results: Firefox should recognize that there is no gamma information to work with and skip color management for the image. I'm not sure whether this "bug" is intentional or not, but it does break websites where the designers chose to shrink images used in layouts to preserve bandwidth. It also affects images on image hosts that strip unnecessary metadata for the same reason.
Component: General → GFX: Color Management
Product: Firefox → Core
QA Contact: general → color-management
Version: unspecified → 1.9.1 Branch
Can you attach an image that shows this?
With color-profiling enabled in Firefox, one can clearly see a change in the gradient in the middle (which is #7f7f7f in the image, but is displayed as #747474).
(In reply to comment #2) > Created an attachment (id=390930) [details] > A perfect black-to-white gradient stored in a PNG image without gamma > information. > > With color-profiling enabled in Firefox, one can clearly see a change in the > gradient in the middle (which is #7f7f7f in the image, but is displayed as > #747474). That image has a PNG_INFO_sRGB chunk which means that Firefox treats it as though it has a sRGB color profile and a gamma of about 2.2.
I've encountered what seems to be the same bug. I was trying to match a color in a PNG to a background color for a webpage. The match worked fine in IE and Chrome, but Firefox rendered the PNG darker. #003653 in the PNG seemed to render as #022d4d in Firefox when checked with GIMP. The attached image demonstrates this. I'm also on Vista x86.
I think I'm also running into the same problem. I have a ref testing framework which compares .PNGs and WebGL scripts running in the canvas. Some of the colors like red and yellow are darker than what they should be. In Chrome, the colors seem fine. I uploaded an image which shows the ref tester failing in Minefield. It also fails in Chrome, but that's because of an anti-aliasing issue.
Could you attach a testcase here?
Sorry, I've been busy and haven't had a chance to write a reduced test case. However, I tested the problem with an updated version of Minefield and the problem seems to have been resolved.
We are now the same as Safari, but slightly different than Chrome. Still, I think there isn't a bug here.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Agreed. Safari and Firefox are the only browsers that honor the output color profile. The difference in Chrome is expected.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: