[Mapserver-users] mapscript saveimage & transparency
Charlton Purvis
cpurvis at asg.sc.edu
Mon Aug 4 09:59:02 PDT 2003
Hi, folks:
If I have the following code. . .
$url = $oImage->saveImage("");
. . . I get a beautiful (and correct) image in my browser (BTW header
stuff is properly set).
Good image:
http://caro-coops.org/~cpurvis/misc/transparent_stdout.png.
But let's say I want to save it for later use, so I do a . . .
$url = $oImage->saveImage("/tmp/ms_tmp/charlton.png");
. . . the resulting image is not the same.
Bad image:
http://caro-coops.org/~cpurvis/misc/transparent_tofile.png.
So for kicks, if I do this . . .
$url = $oImage->saveImage("/tmp/ms_tmp/charlton.png");
$url = $oImage->saveImage("");
. . . I end up w/ the same kind of image from the second scenario. I
would have thought that I would have gotten the good image.
This is based on a .map which contains:
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
TRANSPARENT ON
END
...
LAYER
NAME "elevation_surge"
TRANSPARENCY 40
...
If I turn transparency off, the images on disk and the images coming
back from stdout are identical.
MS 3.7dev, gd-2.0.15, gdal-1.1.8
Any ideas?
Thanks,
Charlton
Charlton Purvis
(803) 777-8858 : voice
(803) 777-8833 : fax
cpurvis at sc.edu
Advanced Solutions Group
Department of Physics and Astronomy
University of South Carolina
Columbia, SC 29208
More information about the MapServer-users
mailing list