[eog] Assume sRGB when image doesn't have an ICC profile attached
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Assume sRGB when image doesn't have an ICC profile attached
- Date: Mon, 3 Mar 2014 22:04:50 +0000 (UTC)
commit dfdc1874b09e06d47369d33c2b6bad9f0d664c5c
Author: pdknsk <pdknsk gmail com>
Date: Mon Mar 3 22:46:19 2014 +0100
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
src/eog-image.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index 2b646f5..d94604a 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -693,7 +693,14 @@ eog_image_apply_display_profile (EogImage *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 */
+ eog_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 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]