[ptx] Re: editing panorams in gimp (multiple layers)

Pablo d'Angelo pablo at mathematik.uni-ulm.de
Sat Nov 22 02:52:35 GMT 2003


On Fri, 21 Nov 2003, Kai-Uwe Behrmann wrote:

> Please wait for gimp-2.0 and I will look again at compatibility (or You
> may do it and I can merge it in).

heres a patch to make it compile with some warnings for gimp 1.3, and it
seems to work for reading pano tools tif files and multilayer support works
as well.

ciao
  Pablo
--
http://wurm.wohnheim.uni-ulm.de/~redman/
Please use PGP
-------------- next part --------------
--- tiff_old.c	2003-11-21 08:33:17.000000000 +0100
+++ tiff.c	2003-11-22 03:11:15.000000000 +0100
@@ -85,7 +85,11 @@
     #include <libgimp/gimp.h>
     #include <libgimp/gimpui.h>
 
-    #include "libgimp/stdplugins-intl.h"
+//    #include "libgimp/stdplugins-intl.h"
+
+    #define INIT_I18N_UI()
+    #define INIT_I18N()
+    #define _(a) a
   #else
     #include "lib/config.h"
     #include "lib/plugin_main.h"
@@ -192,8 +196,11 @@
   gushort  extra, *extra_types;	// additional channels
   gint     alpha;		// extra == alpha channel?
   gint     assoc;		// alpha is premultiplied - associated ?
+#if GIMP_MAJOR_VERSION == 1 && GIMP_MINOR_VERSION == 3
+  GimpRGB  color;  // for gimp-1.3 , filmgimp needs: guchar color
+#else
   guchar color[3];		// ??
-  // GimpRGB  color;  // for gimp-1.3 , filmgimp needs: guchar color 
+#endif
 
   gint   worst_case;		// fallback switch
 
@@ -230,11 +237,18 @@
 /* Declare some local functions.
  */
 static void   query      (void);
+static void run (const gchar    *name,
+                 gint      nparams,
+                 const GimpParam  *param,
+                 gint     *nreturn_vals,
+                 GimpParam **return_vals);
+/*
 static void   run        (gchar    *name,
                           gint      nparams,
                           GimpParam  *param,
                           gint     *nreturn_vals,
                           GimpParam **return_vals);
+*/
 
 static gint   get_image_info (	TIFF 		*tif,
 				IMAGE_info	*current_info);
@@ -459,14 +473,14 @@
 }
 
 static void
-run (char    *name,
-     int      nparams,
-     GimpParam  *param,
-     int     *nreturn_vals,
+run (const gchar    *name,
+     gint      nparams,
+     const GimpParam  *param,
+     gint     *nreturn_vals,
      GimpParam **return_vals)
 {
   static GimpParam values[2];
-  GimpRunModeType run_mode;
+  GimpRunMode run_mode;
   GimpPDBStatusType status = GIMP_PDB_SUCCESS;
   gint32 image_ID;
 #ifdef GIMP_HAVE_PARASITES
@@ -1480,7 +1494,7 @@
       for (i= 0; i < (gint)current_info->extra; ++i) {
         channel[i].ID= gimp_channel_new(image_ID, "TIFF Channel",
 			(guint)current_info->cols, (guint)current_info->rows,
-		        100.0, current_info->color);
+		        100.0, &(current_info->color));
         gimp_image_add_channel(image_ID, channel[i].ID, 0);
         channel[i].drawable= gimp_drawable_get (channel[i].ID);
       }


More information about the ptX mailing list