summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Crichton <crichton@src.gnome.org>2000-02-14 23:26:01 +0000
committerMark Crichton <crichton@src.gnome.org>2000-02-14 23:26:01 +0000
commitd0f73034cf5e6c5b7f52ce7d31bd3b3d8cca0d4c (patch)
treeefe9d49a31690971c9a09ed58d548d69b30a807a
parent97f2c2b7bb200e30733d1112277f1e9f5ad07de9 (diff)
downloadgtk+-d0f73034cf5e6c5b7f52ce7d31bd3b3d8cca0d4c.tar.gz
Iain sent me a xpm that didn't load. It used "g" instead of "c" in it's
Iain sent me a xpm that didn't load. It used "g" instead of "c" in it's color table. I thought that was borked until I saw Imlib, xv, and Gimp load it up w/o problem... So, fixed that (less than one line fix). HOWEVER, if this is correct, then the gdk XPM loader in gtk+ also has the same problem. Owen, got an opinion on this? Mark
-rw-r--r--gdk-pixbuf/ChangeLog5
-rw-r--r--gdk-pixbuf/io-xpm.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 04e4aaad68..a19b927dfa 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2000-02-14 Mark Crichton <crichton@gimp.org>
+
+ * gdk-pixbuf/io-xpm.c (xpm_extract_color): Added check for "g" color type.
+ Imlib/libXpm handle this, but we didn't.
+
2000-02-14 Darin Adler <darin@eazel.com>
* gdk-pixbuf/testpixbuf.c: Remove now-unnecessary cast.
diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c
index 69a3a4e79e..dcc4a8c30a 100644
--- a/gdk-pixbuf/io-xpm.c
+++ b/gdk-pixbuf/io-xpm.c
@@ -195,7 +195,7 @@ xpm_extract_color (const gchar *buffer)
counter = 0;
while (ptr == NULL) {
- if (buffer[counter] == 'c') {
+ if ((buffer[counter] == 'c') || (buffer[counter] == 'g')) {
ch = buffer[counter + 1];
if (ch == 0x20 || ch == 0x09)
ptr = &buffer[counter + 1];