PHP Mapscript, imageformat settings being ignored
Gregor Mosheh
gregor at HOSTGIS.COM
Fri Dec 8 09:39:25 PST 2006
Hi, all.
I've looked over Google for this a few times, and still can't find a thing
(except a bug resolved back in 2004). Any ideas?
I want to output transparent PNG24 images, since that seems to be the only
image format that supports transparency without mangling colors. PHP
Mapscript seems to be ignoring my attempts to set the image format
options, so I always get non-transparent images.
My code snippet:
$map = ms_newMapObj(NULL);
$map->selectOutputFormat('png24');
$map->outputformat->set('imagemode',MS_IMAGEMODE_RGBA);
$map->outputformat->set('transparent',MS_ON);
Generate mapfile snippet:
OUTPUTFORMAT
NAME "png24"
MIMETYPE "image/png; mode=24bit"
DRIVER "GD/PNG"
EXTENSION "png"
IMAGEMODE "RGB"
TRANSPARENT FALSE
END
More information about the MapServer-users
mailing list