Closed Bug 1615394 Opened 4 years ago Closed 4 years ago

Add color management support to BMP decoder

Categories

(Core :: Graphics: ImageLib, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

BMPs can include an ICC profile. The v5 header is described here:

https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapv5header

Fields such as bV5CSType, bV5ProfileData, bV5ProfileSize, etc are all relevant. Currently we just assume BMPs are always sRGB. Presumably this is mostly relevant we were are pasting an image from the clipboard and/or reencoding it into a different format -- being able to get the ICC data would be very useful indeed.

Blocks: 1615397

This patch adds support for color management in BMPs added in
BITMAPV4HEADER and BITMAPV5HEADER. While display of BMPs is relatively
rare this comes in handy when interacting with the Windows clipboard.

Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Blocks: 1619332
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/388ac5609ceb
Add color management support to the BMP decoder. r=tnikkel
Flags: needinfo?(aosmond)
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e5d74671e98
Add color management support to the BMP decoder. r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Regressions: 1619847
You need to log in before you can comment on or make changes to this bug.