Expose color profile used during decoding
Categories
(Core :: Graphics: ImageLib, enhancement, P3)
Tracking
()
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
We need to expose the color profile using during decoding somehow to a caller. This would be used to attach the ICC profile when re-encoding an image to another format (e.g. to a BMP on Windows, CGImage on Mac, etc).
Assignee | ||
Comment 1•4 years ago
|
||
Given the relative rarity of this (just clipboard really), I think a good approach is to add a new SurfaceFlag, EXPORT_ICC_PROFILE. This will cause a redecode since it won't match anything in the cache, but that will be true in general since we want to start using NO_COLORSPACE_CONVERSION / NO_PREMULTIPLY_ALPHA. If the new SurfaceFlag is set, we can use SourceSurface::AddUserData to hang a pointer to the ICC profile / metadata off it, which can be checked for in the encoder.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
•
|
||
More generally, this should probably be something like EXPORT_IMAGE_METADATA. The encoders can do a better job knowing what relevant parameters were used during decoding with that data. By default they need to assume they are premultiplied, and possibly undo that effect in the encoder; if we supply all of these bits and bobs with the ICC profile, then the encoder can make a much more intelligent decision on how to proceed with the re-encoding. EXIF rotation data should also be supplied to allow fixing bug 1583309 without doing the rotation ourselves.
Updated•2 years ago
|
Description
•