2

I have problems using mapproxy with QGIS-server via openlayers (mapproxy-1.6.0, qgis-server 2 and openlayers-2.13.1).

I have a layer in which i defined the background of the polygon with transparency.

When I asked directly qgis-server via openlayers, I get the png wanted (png background is entirely transparent and the transparency of the background is what i need).

When I pass through maproxy, the image background is transparent but not the background of the polygons (the setting of the mapproxy may be ok because I get a transparent png image). What's weird is when I set the background of a polygon with less than 50% transparency in QGIS, through mapproxy the background of the polygon is completely opaque and when I put a transparency equal to or greater than 50%, the background of polygons is completely transparent.

Exemple directly from qgis-server : enter image description here

Exemple via mapproxy : enter image description here

2

In source or cache settings, add paletted:false to force PNG to 24 bits not 8bits

http://mapproxy.org/docs/1.6.0/confi...image-paletted

globals:
    picture:
        paletted: false

or

cache:
    mycache:
        ...
        picture:
            paletted: false

For more precision, the pixels of a PNG8 (8bit) have an alpha channel but they are either completely opaque or completely transparent. For PNG24 the pixels can have 256 levels of transparency. http://www.sitepoint.com/png8-the-clear-winner/

http://en.wikipedia.org/wiki/Portabl...rency_of_image "

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.