[mapserver-users] Background color using PHP/MapScript.

Rob Martinson cathode at nichebox.com
Sun Jul 22 03:27:45 EDT 2001


Beau,

I wrote parameters for the saveImage line incorrectly in that .phps. I
think what is happening is it's setting color index 90 to transparent
which allows your background to show through (maybe? Just a guess, I
know my line is incorrect). Try changing line 82 of buildmap.php from:

$img->saveImage("",MS_PNG,90,0, 0);

To: $img->saveImage("",MS_PNG,MS_FALSE,MS_TRUE,-1);


Rob Martinson
Nichebox - http://www.nichebox.com
Development - http://dev.nichebox.com 

> -----Original Message-----
> From: owner-mapserver-users at lists.gis.umn.edu 
> [mailto:owner-mapserver-users at lists.gis.umn.edu] On Behalf Of 
> Beau Gunderson
> Sent: Sunday, July 22, 2001 3:05 AM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [mapserver-users] Background color using PHP/MapScript.
> 
> 
> I'm trying to figure out if I messed something up or if I'm 
> setting something wrong with my php. I'm trying to use 
> buildmap.php from a previous post. I'm using GD 1.8.4. My 
> mapserv CGI works great, I only have this problem when using 
> PHP/Mapscript.
> 
> The problem is that I set my background color in my .map file 
> to blue. The image I receive has a white background color, 
> and around any labels that extend on the background I get a 
> few blue pixels. I thought that it might have something to do 
> with the transprent color but that doesn't seem to be the case.
> 
> Look at http://bludwulf-bsd.dyn.dhs.org/loc-dns/ to see what I mean.
> 
http://bludwulf-bsd.dyn.dhs.org/loc-dns/maps/studios.map is my mapfile.

-Beau Gunderson





More information about the mapserver-users mailing list