diff options
author | Victor Kareh <[email protected]> | 2019-07-08 16:52:23 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-14 08:44:54 +0200 |
commit | afe865d994a873e2ec86f14820414f4a82825751 (patch) | |
tree | 32a45889360661ea8c34e985c2282e97ff3f8082 /src | |
parent | 9af2a92113fe00820224b2b16205872713c59e86 (diff) | |
download | eom-afe865d994a873e2ec86f14820414f4a82825751.tar.bz2 eom-afe865d994a873e2ec86f14820414f4a82825751.tar.xz |
Assume sRGB when image doesn't have an ICC profile attached
This seems to be no problem with other image viewers and
is apparently also recommended by W3C.
https://bugzilla.gnome.org/show_bug.cgi?id=554498
upstream commit:
https://gitlab.gnome.org/GNOME/eog/commit/dfdc1874
Diffstat (limited to 'src')
-rw-r--r-- | src/eom-image.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/eom-image.c b/src/eom-image.c index a6f07e4..aa48161 100644 --- a/src/eom-image.c +++ b/src/eom-image.c @@ -629,7 +629,14 @@ eom_image_apply_display_profile (EomImage *img, cmsHPROFILE screen) priv = img->priv; - if (screen == NULL || priv->profile == NULL) return; + if (screen == NULL) return; + + if (priv->profile == NULL) { + /* Assume sRGB color space for images without ICC profile */ + eom_debug_message (DEBUG_LCMS, "Image has no ICC profile. " + "Assuming sRGB."); + priv->profile = cmsCreate_sRGBProfile (); + } /* TODO: support other colorspaces than RGB */ if (cmsGetColorSpace (priv->profile) != cmsSigRgbData || |