[mapserver-users] 24 bit PNG transparent symbols
Toni Pignataro
toni.pignataro at wheregroup.com
Fri Jul 23 05:38:59 PDT 2010
Hello list,
Did any one solve this or have an idea, you Davide? I am having exactly
the same problem, i am not getting the png image transparent.
I know to use the OPACITY, but this gives tranparency to the whole layer
and is not what i need.
What i want is to set the color red in an png symbol transparent . I
created this png in Gimp with an tranparent background and filled it
with the color red (RGB 255,0,0)
My defined OUTPUTFORMAT is:
OUTPUTFORMAT
NAME PNG24
DRIVER "GD/PNG"
MIMETYPE "image/png"
EXTENSION PNG
IMAGEMODE RGBA
TRANSPARENT ON
END
CLASS-section:
STYLE
SYMBOL 'red'
SIZE 100
MINSIZE 100
COLOR 255 0 0
END
Symbol-section:
SYMBOL
NAME "red"
TYPE PIXMAP
IMAGE "red.png"
TRANSPARENT 100
END
So my questions are the following:
1. Due to the mapserverdocumentation it says for TRANSPARENT in the
SYMBOL-section "[color index]". What does this mean?
2. The COLOR defined in the STYLE-section: is this the color on which
the transparency applies?
So her i would place 255 0 0, because this is my color where i want the
transparency?
Thanks for any suggestions,
Toni P.
Davide Ticozzi schrieb:
> Hi List,
>
> I'have the same question posted by Ben Brehmer in the late 2008, but
> nobody have given a response until now.
>
> I've been trying to get 24 bit PNG symbols to be transparent.
>
> I've tried both GD and AGG output. I've tried --with-experimental-png.
> I've tried editing the symbol in photoshop to be transparent.
> Basically fooled around with all the different output format options.
> I've tried both RGB and RGBA png images.
>
> 8 bit PNG symbols work just fine. But the 24 bit symbols always have a
> white and non-transparent background (see attached image).
>
> Is there any other mapfile configurations I can try before I convert
> all of my 24 bit images to 8 bit?
>
> Or maybe this is a known bug?
>
> Thanks,
>
> Dave
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list