Wassimulator / CactusViewer

A small single file image viewer written in C/C++.
BSD 2-Clause "Simplified" License
198 stars 15 forks source link

Support embedded ICC color profile #31

Open o-l-a-v opened 9 months ago

o-l-a-v commented 9 months ago

It seems CactusView does not yet support viewing images with embedded ICC color profile properly. I tested with both JPG and PNG.

Test image source:

Test images transcoded by me:

JPEG example

Sample image can be transcoded to JPG with ICC profile using libjxl ( https://github.com/libjxl/libjxl/releases/tag/v0.9.1 ) like so:

Result in CactusView vs. GIMP

Using XYB

240131 - CactusViewer - JPEG with ICC color profile XYB

Not using XYB

240131 - CactusViewer - JPEG with ICC color profile

PNG example

Sample image can be transcoded to PNG with ICC profile using libjxl ( https://github.com/libjxl/libjxl/releases/tag/v0.9.1 ) like so:

Result CactusView vs. GIMP

240131 - CactusViewer - PNG with ICC color profile

Wassimulator commented 6 months ago

I will need to inspect how these things are encoded and how I should display them. I don't have much knowledge about how these are done. if you have any info or tips I'd appreciate it.

o-l-a-v commented 6 months ago

Cool. 😊 I don't know much about that either, sorry. Maybe the source code of other projects (viewers, decoders?) that handles ICC can be helpful.

Wassimulator commented 6 months ago

I'll take a look into it once I find the time