[mapserver-commits] r11415 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Mar 31 04:50:39 EDT 2011


Author: tbonfort
Date: 2011-03-31 01:50:39 -0700 (Thu, 31 Mar 2011)
New Revision: 11415

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maperror.c
Log:
 fix incorrect background color for INIMAGE exceptions (#3790)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-03-31 02:51:07 UTC (rev 11414)
+++ trunk/mapserver/HISTORY.TXT	2011-03-31 08:50:39 UTC (rev 11415)
@@ -15,7 +15,7 @@
 Current Version (SVN trunk): 
 ---------------------------- 
 
-- ...
+- fix incorrect background color for INIMAGE exceptions (#3790)
 
 Version 6.0.0-beta4 (2011-03-30)
 --------------------------------

Modified: trunk/mapserver/maperror.c
===================================================================
--- trunk/mapserver/maperror.c	2011-03-31 02:51:07 UTC (rev 11414)
+++ trunk/mapserver/maperror.c	2011-03-31 08:50:39 UTC (rev 11415)
@@ -400,7 +400,7 @@
   fontMetrics *font = NULL;
   char *imagepath = NULL, *imageurl = NULL;
   labelStyleObj ls;
-  colorObj labelcolor, labeloutlinecolor;
+  colorObj labelcolor, labeloutlinecolor, imagecolor, *imagecolorptr=NULL;
   ls.color = &labelcolor;
   ls.outlinecolor = &labeloutlinecolor;
   
@@ -419,8 +419,16 @@
   if (format == NULL || !MS_RENDERER_PLUGIN(format) || !format->vtable->supports_bitmap_fonts) 
     format = msCreateDefaultOutputFormat( NULL, "GD/PC256", "gif" );
 
+  if(!format->transparent) {
+     if(map && MS_VALID_COLOR(map->imagecolor)) {
+        imagecolorptr = &map->imagecolor;
+     } else {
+         MS_INIT_COLOR(imagecolor,255,255,255,255);
+         imagecolorptr = &imagecolor;
+     }
+  }
 
-  img = msImageCreate(width,height,format,imagepath,imageurl,MS_DEFAULT_RESOLUTION,MS_DEFAULT_RESOLUTION,NULL);
+  img = msImageCreate(width,height,format,imagepath,imageurl,MS_DEFAULT_RESOLUTION,MS_DEFAULT_RESOLUTION,imagecolorptr);
   renderer = MS_IMAGE_RENDERER(img);
 
   for(i=0;i<5;i++) {



More information about the mapserver-commits mailing list