summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-07-08 17:00:45 -0400
committerraveit65 <[email protected]>2019-09-12 15:58:58 +0200
commit1cfb72d9017f302eddcc3f8f85cfd6bcb3d17d51 (patch)
treeb1d388a38382b17cba1eda21f27074b02bb50069 /src
parent5210c1f71e66deb1e4d4be84f72f30d6061b292b (diff)
downloadeom-1cfb72d9017f302eddcc3f8f85cfd6bcb3d17d51.tar.bz2
eom-1cfb72d9017f302eddcc3f8f85cfd6bcb3d17d51.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
Diffstat (limited to 'src')
-rw-r--r--src/eom-window.c15
1 files changed, 9 insertions, 6 deletions
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;