From 1cfb72d9017f302eddcc3f8f85cfd6bcb3d17d51 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Mon, 8 Jul 2019 17:00:45 -0400 Subject: Assume sRGB if no display profile is set Gimp and Firefox make this assumption as well. https://bugzilla.gnome.org/show_bug.cgi?id=563760 upstream commit: https://gitlab.gnome.org/GNOME/eog/commit/b2b3aa26 --- src/eom-window.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/eom-window.c b/src/eom-window.c index 62624b7..7bde9a0 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -388,7 +388,7 @@ eom_window_get_display_profile (GdkScreen *screen) gulong length; guchar *str; int result; - cmsHPROFILE *profile; + cmsHPROFILE *profile = NULL; char *atom_name; dpy = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); @@ -440,14 +440,17 @@ eom_window_get_display_profile (GdkScreen *screen) if (G_UNLIKELY (profile == NULL)) { eom_debug_message (DEBUG_LCMS, - "Invalid display profile, " - "not correcting"); + "Invalid display profile set, " + "not using it"); } XFree (str); - } else { - profile = NULL; - eom_debug_message (DEBUG_LCMS, "No profile, not correcting"); + } + + if (profile == NULL) { + profile = cmsCreate_sRGBProfile (); + eom_debug_message (DEBUG_LCMS, + "No valid display profile set, assuming sRGB"); } return profile; -- cgit v1.2.1