Open T-3B opened 7 months ago
pqiv uses GTK's own GdkPixbuf for rendering standard file formats, and it looks like it doesn't really support this:
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/104
Do any Gnome default viewers get this right for you? If yes I could take a look at how they do this.
Does disabling the gdkpixbuf backend fix this for you?
GdkPixbuf supports ICC profiles. An example of Gnome viewer supporting this JPG file: "Eye of Gnome"
Does disabling the gdkpixbuf backend fix this for you? No, as well as disabling everything except
wand
(ImageMagick)
A "friend of mine" explained me:
the ICC profile is a base64-encoded null-terminated ASCII string
icc-profile
option key used ingdk_pixbuf_get_option
you can call
gdk_pixbuf_get_option("icc-profile")
which returns a gchar * string, and then you can useg_base64_decode
to get the actual ICC profile buffer which can be fed tolcms2
or something of that form
I don't know many things about all that stuff (sorry), but it feels like it is possible to render this JPG correctly in pqiv
.
Thank you for your fast answer!
Don't hesitate to say if the information of the previous message was enough (or not), or if I should redirect you to actual code of a Gnome image viewer supporting ICC profiles. 🙂
It appears that
pqiv
is ignoring color profiles (ICC).For example this comparison: Left is the PNG version, and right is a JPG with XYB ICC. The right part of the screenshot should be identical to the left if there was a proper color management.
Here is the XYB JPG:
Note that
mpv
does output the correct colors because it fetches the ICC profile (and MPV uses FFmpeg aspqiv
does). Browsers also support ICC profiles.I really hope this will be implemented in
pqiv
. Thank you very much for this minimalist and keyboard-oriented image viewer, I love it :)