[MapProxy] Improving tile contrast

Michael Heerdegen michael_heerdegen at web.de
Tue May 27 07:20:22 PDT 2025


Hi Matt,

> I pulled together a couple of examples of using the `decorate_img`
> callback which might be of help to you:
> https://gist.github.com/walkermatt/1cae669defce037511ada4e0ed01b3cd

Hey wow - very cool, thank you very much!  That's more than a start.

I adapted this according to my needs, and the result is very promising.
I do increase the contrast (better recognizable hill shading!) instead
of lowering.

The only small downside I see: PIL ImageEnhance.Contrast uses different
parameters when enhancing each tile, and that results in tile borders
becoming visible as edges with (small, but recognizable) color
discontinuities.  Dunno whether this is avoidable (even theoretically).

Anyway, I'm really very happy with the result, very cool.


Regards,

Michael.


More information about the MapProxy mailing list