diff options
author | Victor Kareh <[email protected]> | 2019-07-08 17:00:45 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-14 08:44:54 +0200 |
commit | c1b41f5ba3fc8ffb0914c4c325b0205310829c2e (patch) | |
tree | ae8fb5d9f108dbfbe9b6bb25321c79284c3d2bfd | |
parent | 523122f08548d10cc1d09bc035d0d037e551930e (diff) | |
download | eom-c1b41f5ba3fc8ffb0914c4c325b0205310829c2e.tar.bz2 eom-c1b41f5ba3fc8ffb0914c4c325b0205310829c2e.tar.xz |
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
-rw-r--r-- | src/eom-window.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/eom-window.c b/src/eom-window.c index ac29086..e7a3d06 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; |