[gnome-color-manager] trivial: Correct more broken profiles (which I'm thinking is rather my broken code...)
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: Correct more broken profiles (which I'm thinking is rather my broken code...)
- Date: Wed, 9 Dec 2009 12:47:16 +0000 (UTC)
commit 9cd049b3d5faba1101b358ed7aa1cbd26c7f3353
Author: Richard Hughes <richard hughsie com>
Date: Wed Dec 9 10:57:57 2009 +0000
trivial: Correct more broken profiles (which I'm thinking is rather my broken code...)
src/gcm-profile.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-profile.c b/src/gcm-profile.c
index 893a856..3398d2e 100644
--- a/src/gcm-profile.c
+++ b/src/gcm-profile.c
@@ -629,6 +629,13 @@ gcm_profile_parse_multi_localized_unicode (GcmProfile *profile, const gchar *dat
goto out;
}
+ /* correct broken profiles, seen in sRGB_v4_ICC_preference.icc : FIXME: why is the offset one off? */
+ ret = (memcmp (&data[offset+1], "mluc", 4) == 0);
+ if (ret) {
+ text = gcm_profile_parse_multi_localized_unicode (profile, data, offset+1);
+ goto out;
+ }
+
/* an unrecognised tag */
for (i=0x0; i<0x1c; i++) {
egg_warning ("unrecognised text tag");
@@ -665,11 +672,20 @@ gcm_parser_load_icc_xyz_type (GcmProfile *profile, const gchar *data, gsize offs
gfloat x;
gfloat y;
gfloat z;
+ gchar *type;
+
+ /* correct broken profiles, seen in sRGB_v4_ICC_preference.icc : FIXME: why is the offset one off? */
+ ret = (memcmp (&data[offset+1], "XYZ ", 4) == 0);
+ if (ret) {
+ ret = gcm_parser_load_icc_xyz_type (profile, data, offset+1, xyz);
+ goto out;
+ }
/* check we are not a localized tag */
ret = (memcmp (&data[offset], "XYZ ", 4) == 0);
if (!ret) {
- egg_warning ("not an XYZ type");
+ type = g_strndup (&data[offset], 4);
+ egg_warning ("not an XYZ type: '%s'", type);
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]