[mapserver-commits] r10718 - in sandbox/mapserver6: . mapscript/swiginc

svn at osgeo.org svn at osgeo.org
Fri Nov 12 16:36:43 EST 2010


Author: tamas
Date: 2010-11-12 13:36:42 -0800 (Fri, 12 Nov 2010)
New Revision: 10718

Modified:
   sandbox/mapserver6/mapimageio.c
   sandbox/mapserver6/mapscript/swiginc/image.i
   sandbox/mapserver6/mapserver.h
Log:
Fixing issues

Modified: sandbox/mapserver6/mapimageio.c
===================================================================
--- sandbox/mapserver6/mapimageio.c	2010-11-12 15:57:45 UTC (rev 10717)
+++ sandbox/mapserver6/mapimageio.c	2010-11-12 21:36:42 UTC (rev 10718)
@@ -33,7 +33,9 @@
 #include <assert.h>
 #include "jpeglib.h"
 
+#ifdef USE_GIFLIB
 #include "gif_lib.h"
+#endif
 
 MS_CVSID("$Id$")
 
@@ -837,7 +839,7 @@
         return MS_FAILURE;
     }
 }
-
+#ifdef USE_GIFLIB
 static char const *gif_error_msg() {
   static char msg[80];
 
@@ -1107,6 +1109,7 @@
 
    return MS_SUCCESS;
 }
+#endif
 
 int msLoadMSRasterBufferFromFile(char *path, rasterBufferObj *rb) {
     FILE *stream;
@@ -1121,10 +1124,14 @@
     fclose(stream);
     if(png_check_sig(signature,8)) {
          ret = readPNG(path,rb);
-    } else if (!strncmp((char*)signature,"GIF",3)) {
+    }
+#ifdef USE_GIFLIB
+    else if (!strncmp((char*)signature,"GIF",3)) {
 
        ret = readGIF(path,rb);
-    } else {
+    }
+#endif
+    else {
         msSetError(MS_MISCERR,"unsupported pixmap format","readImage()");
         return MS_FAILURE;
     }

Modified: sandbox/mapserver6/mapscript/swiginc/image.i
===================================================================
--- sandbox/mapserver6/mapscript/swiginc/image.i	2010-11-12 15:57:45 UTC (rev 10717)
+++ sandbox/mapserver6/mapscript/swiginc/image.i	2010-11-12 21:36:42 UTC (rev 10718)
@@ -72,7 +72,7 @@
                 msSetError(MS_MEMERR, NULL, "imageObj()");
                 return NULL;
             }
-            if ( (renderer->loadImageFromFile(PyString_AsString(arg1), rb)) == MS_FAILURE)
+            if ( (renderer->loadImageFromFile(file, rb)) == MS_FAILURE)
                 return NULL;
 
             image = msImageCreate(rb->width, rb->height, format, NULL, NULL, 

Modified: sandbox/mapserver6/mapserver.h
===================================================================
--- sandbox/mapserver6/mapserver.h	2010-11-12 15:57:45 UTC (rev 10717)
+++ sandbox/mapserver6/mapserver.h	2010-11-12 21:36:42 UTC (rev 10718)
@@ -2175,6 +2175,8 @@
 MS_DLL_EXPORT int msCheckParentPointer(void* p, char* objname);
 
 MS_DLL_EXPORT int *msAllocateValidClassGroups(layerObj *lp, int *nclasses);
+
+MS_DLL_EXPORT void msFreeRasterBuffer(rasterBufferObj *b);
 /* ==================================================================== */
 /*      End of prototypes for functions in maputil.c                    */
 /* ==================================================================== */
@@ -2453,10 +2455,6 @@
 #define INIT_LABEL_STYLE(s) {(s).font=NULL; (s).size=0; (s).rotation=0; (s).color=NULL; (s).outlinewidth=0; (s).outlinecolor=NULL;}
 
 #ifndef SWIG
-void msFreeRasterBuffer(rasterBufferObj *b);
-#endif /* SWIG */
-
-#ifndef SWIG
 MS_DLL_EXPORT int msInitializeDummyRenderer(rendererVTableObj *vtable);
 MS_DLL_EXPORT int msInitializeRendererVTable(outputFormatObj *outputformat);
 MS_DLL_EXPORT int msPopulateRendererVTableCairoRaster( rendererVTableObj *renderer );



More information about the mapserver-commits mailing list