question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Explicit color management

See original GitHub issue

Description

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:

  1. Consider updating ImageDecodeOptions to have a ColorSpace, and use it instead of transformToSRGB;

  2. Update current APIs that accepts transformToSRGB to accept a ColorSpace instead;

  3. Update old APIs (introduced before API level 26) that don’t accept transformToSRGB to explicit decode images to sRGB.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lpycommented, Apr 17, 2019

Upload a pull request, please take a review 😃 If the direction looks good, I can proceed to sign the CLA, thanks!

0reactions
lambdapioneercommented, Apr 26, 2019

@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:

  • The static-webp backport. This uses libwebp directly on platforms that don’t have built-in webp support. This number is pretty low nowadays.
  • The native image resizer uses libjpeg-turbos jpegtran to resize JPEG images. Afaik, it will drop color information. This is also going away mid-term as we want to reduce the amount of native libraries that are coming with Fresco.

@oprisnik for input regarding the animation backends

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request-Color management in Adobe XD
Solved: When will Adobe finally implement color management in XD? Now all colors are desaturated when viewed in browser. I know it's because...
Read more >
Feature Request - GX Touch Dark Mode - Victron Community
Feature Request - GX Touch Dark Mode. Hi Victron Team. Is there any plan to provide a Dark Mode of this screen in...
Read more >
Coreutils - rejected feature requests - GNU.org
Manipulation with existing tools supports this better; cat --show-ends to highlight trailing whitespace. grep --color was deemed better/sufficient ...
Read more >
411 Variable fill colour for polygons when using "filledcurves ...
It would be much nicer to have the functionality available directly from the plot line. Just to be explicit, the fill style within...
Read more >
Color Management (set color profiles) – Adobe XD Feedback
I'm not sure what the full context of color management is within the ... Or are the votes on feature requests just going...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found