[gnome-color-manager] Ensure we write the colorspace back into the raw profile if we generated it



commit 67d6294efdc192643765b65e651e968ab4079661
Author: Richard Hughes <richard hughsie com>
Date:   Wed Oct 13 16:24:11 2010 +0100

    Ensure we write the colorspace back into the raw profile if we generated it

 libcolor-glib/gcm-profile.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libcolor-glib/gcm-profile.c b/libcolor-glib/gcm-profile.c
index 11ba5c6..e6f6e66 100644
--- a/libcolor-glib/gcm-profile.c
+++ b/libcolor-glib/gcm-profile.c
@@ -938,6 +938,14 @@ gcm_profile_save (GcmProfile *profile, const gchar *filename, GError **error)
 		goto out;
 	}
 
+	/* this is all we support writing */
+	if (priv->colorspace == GCM_COLORSPACE_RGB) {
+		cmsSetColorSpace (priv->lcms_profile, cmsSigRgbData);
+		cmsSetPCS (priv->lcms_profile, cmsSigLabData);
+	}
+	if (priv->kind == GCM_PROFILE_KIND_DISPLAY_DEVICE)
+		cmsSetDeviceClass (priv->lcms_profile, cmsSigDisplayClass);
+
 	/* write text data */
 	if (priv->description != NULL) {
 		ret = _cmsWriteTagTextAscii (priv->lcms_profile,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]