Transparent PNG files...

Dan Taylor logicalgenetics at GMAIL.COM
Tue Apr 19 10:53:52 EDT 2005


Thanks to you both for your help.

I managed to solve the problem by making the PNG transparent, as you
suggest and using the transparent colour's index.  Strangely, I also
needed to include "TRANSPARENT 100" in my layer definition.  This
makes very little sense, but I have it working now so I don't care ;o)

http://logicalgenetics.com/assorted/upload/1_M120D424950S37D037775SM118D737450S38D444025S600S500S1S1S2005M04M17S20C51C49.jpg

http://logicalgenetics.com/assorted/upload/M120D424950S37D037775SM118D737450S38D444025S600S500S1S1S2005M04M17S20C51C49.jpg

Cheers!

Dan

On 4/19/05, James Sohr <jms4 at po.cwru.edu> wrote:
> I've sometimes had problems getting PNGs do display transparency using
> the "Transparent" keyword with an index-- even when I specify the proper
> index, the specified color doesn't become transparent.
> 
> The best solution I've found is to ensure the PNG was saved natively with
> transparency.  I'm not sure how it would be done in Paint Shop Pro, but in
> Photoshop you can save the PNG as a transparent PNG file and can even
> specify the transparency color.  I can use this PNG in Mapserver fine--
> the key is then to not use the "Transparent" keyword at all.
> 
> If you want, you can post a link to your PNG file and I'd be happy to
> see if I can get it go transparent.
> 
> As far as GIF files goes, it might be that your version of mapserver
> wasn't compiled with GIF support.  You can type  "mapserv -v" at the
> command line (on Windows), or "./mapserv -v" at a shell prompt to find
> out.
> 
> HTH,
>   James
> 


-- 
Dan Taylor

Software Development Engineer, JTL Systems Ltd
PhD Student, Reading University, UK

http://www.logicalgenetics.com



More information about the mapserver-users mailing list