Hi,
I have an external WMS service which lets query for maps in different graphic formats:
image/jpeg, image/tiff, image/png, image/png8, image/png24, image/png32, image/gif, image/bmp, image/svg+xml
For my task its is important that returned data support transparency and let me compose multiple overlays as one picture. That is why I went for image/png at first. Server is public therefore I provide a link for GetMap request:
GetMap with image/png
When you look carefully at the picture you will see some kind of artifact on the roof of the building. This artifact comes from incorrect transparency data returned by the server. You may save reply as a file and open it in a graphical tool like GIMP and have a look at transparency channel which seems to be present.
There is a lot more of such in different places therefore in the next step I used image/png32:
GetMap with image/png32
This time it looks as expected - no artifacts and transparency channel looks correct (there is no transparent spots on this tile - but I could see proper transparency in other places where it should be).
Ok, but then comes the question - what ArcGIS returns as a reply when queried with image/png? From the received data we can learn that it is not a png8 and not a png24, since it has 3 channels + alpha in it. On the other hand it is also not a png32 because it's alpha channel seems to be different (somehow corrupted) when compared to data returned explicitly by query which image/png32.
It seems that only image/png32 output gives correct data in all cases - proper transparency and no artifacts. I have also tried other formats which should support transparency (like gif for example) but I have always had a picture with artifacts. Only png32 worked well.
I have seen this kind of problems on many WMS services. It would be good to find reasonable explanation because not all of the servers offer image/png32 as a possible output.
What is the image/png format then? Why it's alpha channel is not correct? How it differs from image/png32?
I hope someone will know the answer.
Regards,
Marek.