Open Bug 1322030 Opened 8 years ago Updated 6 months ago

Color management for a pic only with EXIF InteropIndex

Categories

(Core :: Graphics: Color Management, enhancement, P3)

enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: bxp04335, Unassigned)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files)

Firefox doesn't handle a color space of a picture only with InteropIndex correctly.

<steps of reproduce>
1. open an attached JPEG, InteropIndex.jpg
2. open another attached JPEG, InteropIndexICCProfile.jpg
3. <reproduce> Firefox doesn't show two JPEGs as the same color.

I confirmed it on this build:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0 ID:20161203030204 CSet: 557548714db55136b51e1129d649e2599797985f

<expected result>
Firefox shows two JPEGs as the same color.

<comment>
InteropIndex.jpg has only EXIF InteropIndex = R03, Adobe RGB. InteropIndexICCProfile.jpg is InteropIndex.jpg which ICC Profile for Adobe RGB is added in.
Firefox seems to require ICC Profile in a picture to choose its color space. But most of cameras, including my Pentax K-3 making InteropIndex.jpg, write a JPEG picture only with EXIF InteropIndex, without ICC Profile. Firefox should choose a color space only with EXIF InteropIndex.

Microsoft Edge handles EXIF InteropIndex effectively. Little cms apparently also does.
https://sourceforge.net/p/lcms/mailman/message/19191688/
Keywords: feature
Priority: -- → P3
Whiteboard: [gfx-noted]
Type: defect → enhancement
Keywords: feature
Severity: normal → S3

Firefox is treating the example image without embedded ICC profile as untagged.
It then correctly assumes it to be sRGB (W3C standard https://www.w3.org/TR/css-color-4/#untagged).

Embedding an ICC profile is one -widely recognised- way to tag an image.
However as W3 put it "Image formats may also use other, equivalent methods, often for brevity."

The interoperability index , used by most if not all camera manufacturers, is one of those methods used for brevity.
It's part of DCF - Design rule for camera filesystem specification.
Most straight out of camera JPEG images will not have an embedded ICC profile, but the EXIF metadata does contain the "InteropIndex" tag.
It's even the very first tag 0x0001 (https://www.exiftool.org/TagNames/EXIF.html) and part of the official EXIF specification.

It would be a nice addition if Firefox could read this EXIF tag and treat an image accordingly (as tagged) instead of falling back to sRGB (as if untagged).

(In reply to [:Propheticus] from comment #2)

Firefox is treating the example image without embedded ICC profile as untagged.
It then correctly assumes it to be sRGB (W3C standard https://www.w3.org/TR/css-color-4/#untagged).
...

I just realised (and tested) this is only true because I have 'gfx.color_management.mode' set to '1' (always colour manage) instead of the default '2' (only colour manage when image is tagged).
So it's even worse. With default settings, Firefox is not W3C compliant.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: