[Cartoweb-users] Transparency in a PNG24 outputformat

Valerio Noti valerionoti at yahoo.it
Fri Jun 30 03:28:56 EDT 2006


Hello,
Is it possible to get transparency in a PNG24 outputformat? 
I'm trying to display a 24bit ecw image in my cartoweb application (3.2.0) with vector layers in transparency over the image.
I cannot output the transparency with following mapfile (points and polygons hide the image)
...
IMAGETYPE PNG24
...
OUTPUTFORMAT
     NAME PNG24
     DRIVER "GD/PNG"
     MIMETYPE "image/png"
     EXTENSION PNG
     FORMATOPTION "INTERLACE=OFF"
     IMAGEMODE RGBA
    TRANSPARENT ON
  END
...
LAYER
    NAME "msMont" #mare
    DATA "elba.ecw"
    TYPE RASTER
END
....
The behaviour doesn't change if I set:

"force_imagetype" "jpeg"

in raster metadata

**********************************

If I set normal png outputformat, I get transparency but image quality reduced to 8 bit:

 OUTPUTFORMAT
    NAME png
   DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE PC256
    EXTENSION "png"
   FORMATOPTION "INTERLACE=OFF"
    TRANSPARENT ON
  END

************************************


Thanks for any help

Valerio






More information about the Cartoweb-users mailing list