[mapserver-commits] r11232 - in trunk/mapserver/mapscript: python swiginc

svn at osgeo.org svn at osgeo.org
Fri Mar 18 11:47:40 EDT 2011


Author: tbonfort
Date: 2011-03-18 08:47:40 -0700 (Fri, 18 Mar 2011)
New Revision: 11232

Modified:
   trunk/mapserver/mapscript/python/pyextend.i
   trunk/mapserver/mapscript/swiginc/image.i
   trunk/mapserver/mapscript/swiginc/outputformat.i
   trunk/mapserver/mapscript/swiginc/symbol.i
Log:
propagate msCreateDefaultOutputFormat to mapscript


Modified: trunk/mapserver/mapscript/python/pyextend.i
===================================================================
--- trunk/mapserver/mapscript/python/pyextend.i	2011-03-18 15:17:35 UTC (rev 11231)
+++ trunk/mapserver/mapscript/python/pyextend.i	2011-03-18 15:47:40 UTC (rev 11232)
@@ -185,20 +185,17 @@
         if ((PyInt_Check(arg1) && PyInt_Check(arg2)) || PyString_Check(arg1))
         {
             if (input_format == Py_None) {
-                format = msCreateDefaultOutputFormat(NULL, "GD/GIF");
+                format = msCreateDefaultOutputFormat(NULL, "GD/GIF", "gdgif");
                 if (format == NULL)
-                    format = msCreateDefaultOutputFormat(NULL, "GD/PNG");
-                if (format == NULL)
-                    format = msCreateDefaultOutputFormat(NULL, "GD/JPEG");
-                if (format == NULL)
-                    format = msCreateDefaultOutputFormat(NULL, "GD/WBMP");
+                    format = msCreateDefaultOutputFormat(NULL, "GD/PNG", "gdpng");
 
-            if (format)
-                msInitializeRendererVTable(format);
+                if (format)
+                  msInitializeRendererVTable(format);
             }
             else if (PyString_Check(input_format)) {
                 format = msCreateDefaultOutputFormat(NULL, 
-                                                     PyString_AsString(input_format));
+                                                     PyString_AsString(input_format),
+                                                     NULL);
             }
             else {
                 if ((SWIG_ConvertPtr(input_format, (void **) &format,

Modified: trunk/mapserver/mapscript/swiginc/image.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/image.i	2011-03-18 15:17:35 UTC (rev 11231)
+++ trunk/mapserver/mapscript/swiginc/image.i	2011-03-18 15:47:40 UTC (rev 11232)
@@ -47,13 +47,10 @@
             format = input_format;
         }
         else {
-            format = msCreateDefaultOutputFormat(NULL, "GD/GIF");
+            format = msCreateDefaultOutputFormat(NULL, "GD/GIF", "gdgif");
             if (format == NULL)
-                format = msCreateDefaultOutputFormat(NULL, "GD/PNG");
+                format = msCreateDefaultOutputFormat(NULL, "GD/PNG", "gdpng");
             if (format == NULL)
-                format = msCreateDefaultOutputFormat(NULL, "GD/JPEG");
-            if (format == NULL)
-                format = msCreateDefaultOutputFormat(NULL, "GD/WBMP");
 
             if (format)
                 msInitializeRendererVTable(format);

Modified: trunk/mapserver/mapscript/swiginc/outputformat.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/outputformat.i	2011-03-18 15:17:35 UTC (rev 11231)
+++ trunk/mapserver/mapscript/swiginc/outputformat.i	2011-03-18 15:47:40 UTC (rev 11232)
@@ -36,7 +36,7 @@
     {
         outputFormatObj *format;
 
-        format = msCreateDefaultOutputFormat(NULL, driver);
+        format = msCreateDefaultOutputFormat(NULL, driver, name);
 
         /* in the case of unsupported formats, msCreateDefaultOutputFormat
            should return NULL */
@@ -53,11 +53,6 @@
         format->refcount++;
 	format->inmapfile = MS_TRUE;
 
-        if (name != NULL)
-        {
-            free(format->name);
-            format->name = strdup(name);
-        }
         return format;
     }
 

Modified: trunk/mapserver/mapscript/swiginc/symbol.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/symbol.i	2011-03-18 15:17:35 UTC (rev 11231)
+++ trunk/mapserver/mapscript/swiginc/symbol.i	2011-03-18 15:47:40 UTC (rev 11232)
@@ -119,13 +119,9 @@
         }
         else 
         {
-            format = msCreateDefaultOutputFormat(NULL, "GD/GIF");
+            format = msCreateDefaultOutputFormat(NULL, "GD/GIF", "gdgif");
             if (format == NULL)
-                format = msCreateDefaultOutputFormat(NULL, "GD/PNG");
-            if (format == NULL)
-                format = msCreateDefaultOutputFormat(NULL, "GD/JPEG");
-            if (format == NULL)
-                format = msCreateDefaultOutputFormat(NULL, "GD/WBMP");
+                format = msCreateDefaultOutputFormat(NULL, "GD/PNG", "gdpng");
 
             if (format)
                 msInitializeRendererVTable(format);



More information about the mapserver-commits mailing list