After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727467 - ignores colour profiles on TIFF
ignores colour profiles on TIFF
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: image viewer
3.12.x
Other All
: Normal major
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-01 23:07 UTC by Christoph Anton Mitterer
Modified: 2014-04-26 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.98 KB, patch)
2014-04-02 20:16 UTC, Felix Riemann
reviewed Details | Review

Description Christoph Anton Mitterer 2014-04-01 23:07:53 UTC
Hi.

For some reasons it seems that eog ignores the colour profiles (both ICC v2 and v4) on TIFF files.

$ export EOG_DEBUG_LCMS=1
$ eog Lower_Left.tiff 
[0,013305 (0,013305)] eog-window.c:470 (eog_window_get_display_profile) No valid display profile set, assuming sRGB
[0,105177 (0,091872)] eog-image.c:700 (eog_image_apply_display_profile) Image has no ICC profile. Assuming sRGB.

For testing you can use the sample files from:
http://www.color.org/version4html.xalter
but convert them to TIFF before (with a program, that converts the ICC profiles as well)

Maybe it doesn't work with other formats (JPEG2000?) as well.
It works with JPEG, though.


Cheers,
Chris.
Comment 1 Felix Riemann 2014-04-02 17:01:23 UTC
Yes, color profiles only work with JPEG and PNG at the moment.
TIFF mostly didn't work because eog couldn't extract the profile and color correct RGBA (as are all TIFFs presented internally to eog currently). The latter has changed with 3.12 though and acquiring the profile could work via GdkPixbuf. So, maybe we can get this to work now. However, if your TIFF has a CMYK profile you'll still be out of luck.
Comment 2 Felix Riemann 2014-04-02 20:16:47 UTC
Created attachment 273493 [details] [review]
proposed patch

This is a first shot at fixing this. Dumping it here to avoid forgetting it in some obscure Git branch until I switch master to 3.13. In a short test it did work, however I am not yet sure whether that's the correct place to do it, so this might change again before hitting Git master.
Comment 3 Christoph Anton Mitterer 2014-04-02 20:25:14 UTC
Okay great...

Uhm eog should at least give a warning, I think... in all the cases where it can't handle profiles, yet,... (JPEG2000? SVG?)


Cheers,
Chris.
Comment 4 Felix Riemann 2014-04-26 16:29:16 UTC
Just pushed it to master. It is not really at the right position but the correct one (image loadging code) is in some desperate need of some heavy cleanup first.

commit 48e971cbccc35b43e351fbefb41c4a54246b47ac
Author: Felix Riemann <>
Date:   Wed Apr 2 22:10:24 2014 +0200

    EogImage: Check GdkPixbuf for an ICC profile before falling back to sRGB
    
    If an image's ICC profile cannot be extracted check whether GdkPixbuf
    was able to extract one before falling back to sRGB. This makes it
    possible to color correct TIFF images.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727467

A warning is not good IMHO. If one would come up every time it will start to get on my (users) nerves and I am not sure if average users would understand the warning.
Also the warning could be wrong. Due to the patch above eog will now ask the GdkPixbuf loaders if they were able to extract a profile if needed. The loaders don't have a way query their support for that feature though. So, if the JPEG2000 loader (or an alternative one with higher priority) would start to support image profiles, the blacklist in eog would have to be adjusted by hand.
---
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.