From afe865d994a873e2ec86f14820414f4a82825751 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Mon, 8 Jul 2019 16:52:23 -0400 Subject: 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 --- src/eom-image.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 || -- cgit v1.2.1