While following Adrian's nice tutorial on Gimp Image Pipes, I tried
to load some PSP Tubes and see if I could convert them to Gimp's GIH
format, using gimp-1.1.21 under Solaris (sparc).

All of them failed with the error "PSP: Unrecognized block id ...".
This comes from a missing conversion from little endian format to big
endian.  All integer values from the header are correctly converted,
except for the block id.  The patch is small, so instead of reporting
a bug to bugs.gnome.org and/or submitting the patch to ftp.gimp.org, I
am including it below.

This is against gimp-1.1.21 (the one I have at work for the moment,
until I find the time to install 1.1.22).  I quickly checked the
Changelog using Bonsai and I did not see any recent changes to that
plug-in, so I assume that the patch is still valid for 1.1.22.


--- plug-ins/common/psp.c~      Mon May  1 19:43:17 2000
+++ plug-ins/common/psp.c       Thu May 18 17:12:55 2000
@@ -536,7 +536,7 @@
       *total_len = GUINT32_FROM_LE (len);
-  return id;
+  return GUINT16_FROM_LE (id);
 static gint

Reply via email to