awxkee / jxl-coder

JPEG XL (JXL) Decoder/Encoder library for Android
Apache License 2.0
51 stars 5 forks source link

Wrong color decoding #16

Closed kremzli closed 7 months ago

kremzli commented 7 months ago

Just this: https://github.com/T8RIN/ImageToolbox/issues/893#issuecomment-2007944732

Its still the same with 2.1.8

awxkee commented 7 months ago

I have a few questions because the default sRGB are doing well as I see.

Does your picture have alpha? Does your picture contains embedded ICC or NCLX profile? What android API version is used? May you provide original image or a few?

kremzli commented 7 months ago

Quite sure all the images have nothing special (they are all from Discord), im on Android 14 (OneUI 6.0) Heres a link to the converted JXL's and the source images: https://drive.proton.me/urls/F9XCTGDXZM#oiYgeqLBFjaI

They decode as expected on KDE's image viewer Gwenview (Linux)

awxkee commented 7 months ago

One image is sRGB, other one contains Display P3 sRGB Transfer ICC profile, however I don't see any difference in test app after roundtrip with encoding and decoding

Screenshot_20240328_153905_JXLCoder

Screenshot_20240328_153900_JXLCoder

awxkee commented 7 months ago

Did I miss something?

kremzli commented 7 months ago

The one with oranges is a screenshot from my phone so that may apply a icc profile to it. Idk whats the issue but in ImageToolbox it decodes wrong Screenshot_20240328_174526_Image Toolbox

Thats with JXL Lossless. They all have similar result (the oranges one decodes brighter) on both RGBA and RGB. Outside of ImageToolbox it decodes properly

awxkee commented 7 months ago

I'm not able to reproduce in test app on my side any of those wrong conversion.