diff options
author | Victor Kareh <[email protected]> | 2019-07-08 16:52:23 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-09-12 15:58:17 +0200 |
commit | 44e3ad862f524c9443c67095b2d702c083929cf4 (patch) | |
tree | 3d4c8a2687852acb16317e63679bf99fb6decc90 | |
parent | 1f35dd9e592addbe88d1c5ec9a19d4efbb980e3d (diff) | |
download | eom-44e3ad862f524c9443c67095b2d702c083929cf4.tar.bz2 eom-44e3ad862f524c9443c67095b2d702c083929cf4.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
-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 1cd2690..bb4c5b2 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 || |