Transparent PNG files...

Dan Taylor logicalgenetics at GMAIL.COM
Tue Apr 19 05:50:53 EDT 2005


Following up from another thread, I'm currently attempting to show
woodland as a polygon filled with tree images.  It has been suggested
to me that I use two or more transparent images to fill the polygon
and get the effect I want.  However, I have hit another problem.

I get the warning: "Warning: [MapServer Error]: loadSymbol(): Unable
to load GIF symbol" when I try to load a gif image using the following
in my map file:

SYMBOL
  NAME 'tree3'
  TYPE pixmap
  TRANSPARENT 127
  IMAGE 'symbols/trees.gif'
END

If I try to use a PNG image it won't go transparent.  Using Paint Shop
pro I have examined the palette to find the index of the colour I want
to be transparent (white), so as far as I know it's correct.  The
image ends up looking wrong.  See mapfile snippet and link for
example.

SYMBOL
  NAME 'tree4'
  TYPE pixmap
  TRANSPARENT 0
  IMAGE 'symbols/trees2.png'
END

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

So I have two questions...

1)  Can transparent PNG images be used and if so, how?

2)  Why can my version of mapserver not load GIF images?  Do I need to
compile something extra in?

Very best,

Dan

-- 
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