Closed Bug 368794 Opened 15 years ago Closed 15 years ago

PNG Gamma Correction not handled correctly.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: ben, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

PNG files with gamma correction stored in them are not gamma corrected by Firefox.  This results in the image either being too dark or (in this case) too bright.

Reproducible: Always

Steps to Reproduce:
1. Go to the page I specified
2. Look at the second post on that page, at the preview image.
3. Click on the preview to see the full image.
Actual Results:  
When viewing the full image, it appears extremely bright and washed out.

Expected Results:  
The image contains gamma information which Firefox should use to adjust the brightness.  The colors should appear as they do in the preview image (which contains no gamma correction information).

Many programs ignore gamma correction in PNG files, and blame the picture authors for the images looking wrong on various systems.  This is sloppy programming.  If gamma correction were not present, not handling it would be acceptable.

However, when the gamma information is present in a file, it should be accounted for.  Images containing this gamma correction should be adjusted accordingly.  Although doing so will probably break many existing web pages, it will break them in the same way that correct support of CSS breaks web pages designed for Internet Explorer.  That is, the web pages are already broken, and Firefox should behave appropriately regardless.

Since so much of the Web is imagery, I consider the lack of correct support for one of the most common image formats to be a bug in a major feature.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: colorsync
It's not a dupe.  The large image contains an incorrect gamma value (2.2 instead of 1/2.2) and Gecko is correctly processing it.
Resolution: DUPLICATE → INVALID
You need to log in before you can comment on or make changes to this bug.