[mapserver-commits] r11216 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Mar 17 16:00:08 EDT 2011


Author: assefa
Date: 2011-03-17 13:00:08 -0700 (Thu, 17 Mar 2011)
New Revision: 11216

Modified:
   trunk/mapserver/mapoutput.c
   trunk/mapserver/maprendering.c
Log:
fix windows build

Modified: trunk/mapserver/mapoutput.c
===================================================================
--- trunk/mapserver/mapoutput.c	2011-03-17 19:55:21 UTC (rev 11215)
+++ trunk/mapserver/mapoutput.c	2011-03-17 20:00:08 UTC (rev 11216)
@@ -184,8 +184,8 @@
 #ifdef USE_GD_PNG
     if( strcasecmp(driver,"GD/PNG") == 0 )
     {
-        format = msAllocOutputFormat( map, "png", driver );
-        format->mimetype = msStrdup("image/png");
+        format = msAllocOutputFormat( map, "png8", driver );
+        format->mimetype = msStrdup("image/png; mode=8bit");
         format->imagemode = MS_IMAGEMODE_PC256;
         format->extension = msStrdup("png");
         format->renderer = MS_RENDER_WITH_GD;
@@ -194,13 +194,20 @@
 
     if( strcasecmp(driver,"AGG/PNG") == 0 )
     {
+        format = msAllocOutputFormat( map, "png", driver );
+        format->mimetype = msStrdup("image/png");
+        format->imagemode = MS_IMAGEMODE_RGB;
+        format->extension = msStrdup("png");
+        format->renderer = MS_RENDER_WITH_AGG;
+    }
+    if( strcasecmp(driver,"AGG/PNG") == 0 )
+    {
         format = msAllocOutputFormat( map, "png24", driver );
         format->mimetype = msStrdup("image/png; mode=24bit");
         format->imagemode = MS_IMAGEMODE_RGB;
         format->extension = msStrdup("png");
         format->renderer = MS_RENDER_WITH_AGG;
     }
-    
     if( strcasecmp(driver,"AGG/JPEG") == 0 )
     {
         format = msAllocOutputFormat( map, "jpeg", driver );
@@ -363,13 +370,14 @@
 void msApplyDefaultOutputFormats( mapObj *map )
 {
     char *saved_imagetype;
+    struct defaultOutputFormatEntry *defEntry;
 
     if( map->imagetype == NULL )
         saved_imagetype = NULL;
     else
         saved_imagetype = msStrdup(map->imagetype);
 
-    struct defaultOutputFormatEntry *defEntry = defaultoutputformats;
+    defEntry = defaultoutputformats;
     while(defEntry->name) {
        if( msSelectOutputFormat( map, defEntry->name ) == NULL )
           msCreateDefaultOutputFormat( map, defEntry->driver );

Modified: trunk/mapserver/maprendering.c
===================================================================
--- trunk/mapserver/maprendering.c	2011-03-17 19:55:21 UTC (rev 11215)
+++ trunk/mapserver/maprendering.c	2011-03-17 20:00:08 UTC (rev 11216)
@@ -191,6 +191,7 @@
          imageObj *tile3img = msImageCreate(width*3,height*3,img->format,NULL,NULL,
                img->resolution, img->resolution, NULL);
          int i,j;
+         rasterBufferObj tmpraster;
          for(i=1;i<=3;i++) {
             p_x = (i+0.5)*width;  
             for(j=1;j<=3;j++) {
@@ -216,7 +217,7 @@
                }
             }
          }
-         rasterBufferObj tmpraster;
+        
          MS_IMAGE_RENDERER(tile3img)->getRasterBufferHandle(tile3img,&tmpraster);
          renderer->mergeRasterBuffer(tileimg, 
                &tmpraster,



More information about the mapserver-commits mailing list