Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color differences #9

Open
greatestview opened this issue May 7, 2021 · 3 comments
Open

Color differences #9

greatestview opened this issue May 7, 2021 · 3 comments

Comments

@greatestview
Copy link

I’m trying to figure this one out quite a while, maybe @catdad has an idea?

I’m using heic-convert to generate a buffer from a HEIC file and I have not managed to get a exact similar before/after image. The color contrast seems to be increased, resulting in some burnouts, and colors in general don’t match the original heic image (checked with Photoshop and other image programs, which can handle color profiles).

Since heic-convert uses heic-decode, I’ve tried a different setup with heic-decode and afterwards lovell/sharp with the same results.

This is an example of a HEIC file, left: original HEIC file with Display P3 color profile, right: after heic-decode also with Display P3 color profile (scaled down)

Bildschirmfoto 2021-05-07 um 20 41 20

As you can see there are several differences, e.g. a more intense red in the bricks on the left side, more intense black floor and burnouts in the fur on the right side.

I’m trying to understand, which library is responsible for that. Is it a missing or wrong parameter in heic-decode or libheif-js or something fundamental in libheif itself? Are color profiles ignored somewhere on the way?

Thank you for your answer and great work!

@catdad
Copy link
Member

catdad commented May 9, 2021

This is probably a color space issue and it is probably an issue with libheif itself (heic-decode on its own does not do much). Would you be able to share a problem heic file here so that I can help investigate?

@greatestview
Copy link
Author

Thank you for your quick response! It would be awesome if you could have a look into that issue because I’m not that familiar with the libheif internals. I attached the example heic file as well as the JPEG conversions.

@indutny-signal
Copy link

On this topic, which color space are the rgb values in anyway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants