[eog] Assume sRGB if no display profile is set
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Assume sRGB if no display profile is set
- Date: Sun, 29 Jan 2012 18:34:42 +0000 (UTC)
commit b2b3aa269cba01e129d92905cde6268aa9e23eb3
Author: Felix Riemann <friemann gnome org>
Date: Wed Jan 25 20:54:52 2012 +0100
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
src/eog-window.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 6faed86..0f5c524 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -401,7 +401,7 @@ eog_window_get_display_profile (GtkWidget *window)
gulong length;
guchar *str;
int result;
- cmsHPROFILE *profile;
+ cmsHPROFILE *profile = NULL;
char *atom_name;
GdkScreen *screen;
@@ -455,14 +455,17 @@ eog_window_get_display_profile (GtkWidget *window)
if (G_UNLIKELY (profile == NULL)) {
eog_debug_message (DEBUG_LCMS,
- "Invalid display profile, "
- "not correcting");
+ "Invalid display profile set, "
+ "not using it");
}
XFree (str);
- } else {
- profile = NULL;
- eog_debug_message (DEBUG_LCMS, "No profile, not correcting");
+ }
+
+ if (profile == NULL) {
+ profile = cmsCreate_sRGBProfile ();
+ eog_debug_message (DEBUG_LCMS,
+ "No valid display profile set, assuming sRGB");
}
return profile;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]