[Feature Request] Explicit color management
See original GitHub issueDescription
Right now ImagePipeline allows to specify whether to transform to srgb and there are some APIs that use this bit. A more future-proof approach would be explicitly passing a target color space.
Before API level 26, Android only recognized all images as sRGB, right now it looks like old APIs just simply pass a false
to its new variants to not decode to sRGB, which means the encoded color space of the images would likely be the target color space, applications that use the new version of Fresco and run on new OS might end up not getting what they want if they don’t do color management, maybe consider only decode images to sRGB color space for old APIs?
Solution
Just some thoughts:
-
Consider updating ImageDecodeOptions to have a ColorSpace, and use it instead of
transformToSRGB
; -
Update current APIs that accepts
transformToSRGB
to accept aColorSpace
instead; -
Update old APIs (introduced before API level 26) that don’t accept
transformToSRGB
to explicit decode images to sRGB.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top GitHub Comments
Upload a pull request, please take a review 😃 If the direction looks good, I can proceed to sign the CLA, thanks!
@Lpy thanks a lot for doing this! There are two places where we decode without proper colour management, but these places are phasing out slowly:
@oprisnik for input regarding the animation backends