PHP Mapscript, imageformat settings being ignored
Daniel Morissette
dmorissette at MAPGEARS.COM
Fri Dec 8 10:01:43 PST 2006
I made a few tests and checked the php_mapscript.c code and I think the
implementation of selectOutputFormat() fails to update the reference to
the current outputFormatObj inside the PHP wrapper object.
I don't have time to fix that today, but it would be great if you could
file a bug about this and assign it to me so that we don't forget.
Daniel
Gregor Mosheh wrote:
> 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
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list