[gnome-color-manager] trivial: get the profile class and color space from LCMS rather than decoding this ourselves
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: get the profile class and color space from LCMS rather than decoding this ourselves
- Date: Thu, 10 Dec 2009 18:02:31 +0000 (UTC)
commit 3bc684ab9da0f3c70dfdf296d768c699831de66f
Author: Richard Hughes <richard hughsie com>
Date: Thu Dec 10 17:52:01 2009 +0000
trivial: get the profile class and color space from LCMS rather than decoding this ourselves
src/gcm-profile.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gcm-profile.c b/src/gcm-profile.c
index 9396307..651e2ad 100644
--- a/src/gcm-profile.c
+++ b/src/gcm-profile.c
@@ -45,8 +45,6 @@ static void gcm_profile_finalize (GObject *object);
#define GCM_PROFILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GCM_TYPE_PROFILE, GcmProfilePrivate))
#define GCM_HEADER 0x00
-#define GCM_TYPE 0x0c
-#define GCM_COLORSPACE 0x10
#define GCM_CREATION_DATE_TIME 0x18
#define GCM_SIGNATURE 0x24
#define GCM_NUMTAGS 0x80
@@ -712,8 +710,8 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
guint tag_size;
guint tag_offset;
gchar *signature;
- guint32 profile_class;
- guint32 color_space;
+ icProfileClassSignature profile_class;
+ icColorSpaceSignature color_space;
GcmProfilePrivate *priv = profile->priv;
g_return_val_if_fail (GCM_IS_PROFILE (profile), FALSE);
@@ -750,7 +748,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
}
/* get the profile type */
- profile_class = gcm_parser_decode_32 (data + GCM_TYPE);
+ profile_class = cmsGetDeviceClass (priv->lcms_profile);
switch (profile_class) {
case icSigInputClass:
priv->profile_type = GCM_PROFILE_TYPE_INPUT_DEVICE;
@@ -778,7 +776,7 @@ gcm_profile_parse_data (GcmProfile *profile, const guint8 *data, gsize length, G
}
/* get colorspace */
- color_space = gcm_parser_decode_32 (data + GCM_COLORSPACE);
+ color_space = cmsGetColorSpace (priv->lcms_profile);
switch (color_space) {
case icSigXYZData:
priv->colorspace = GCM_PROFILE_COLORSPACE_XYZ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]