[MapProxy] Multi-layer transparency problem

Oliver Tonnhofer olt at omniscale.de
Tue Jan 17 06:52:13 EST 2012

On 16.01.2012, at 09:45, Dejan Gambin wrote:
> Do you think writing some code as a workaround would be complicated? Which part of code should be affected?

You need to implement real alpha compositing[0]. You can implement that with the PIL API, but it will be slow because you can only do one operation (multiply, add, etc) at one time (so maybe 20 operations on your complete image, if you count for each channel). The right solution is improve PIL and implement an alpha compositing function in C. I already worked on the PIL code and this is doable, but it requires a bit of coding and testing.

[0] http://en.wikipedia.org/wiki/Alpha_compositing


Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt | @oltonn

More information about the MapProxy mailing list