[Marble-devel] Openstreetmap
Dennis Nienhüser
earthwings at gentoo.org
Thu Apr 11 21:31:55 UTC 2013
Hi Konrad,
attached are two hacks which accomplish this. The -by-disabling one is
the naughtier because it does not only draw the map tiles grayscale, but
also vector stuff etc drawn on it. The -by-tiledata is a bit more sane,
but still just a rough hack. It transforms the color values of 8 bit
images with color indices to grayscale values when they are accessed.
This is the image format used by OpenStreetMap, so it works for their
tiles (and any other map theme using such data).
Please use either patch just for demonstration purposes. A better
implementation wouldn't be too much work: Add a GrayscaleBlending to
BlendingAlgorithms and BlendingFactory which does the conversion, and
enable it in openstreetmap.dgml (might need a dummy bottom layer to
work). This blending could be added to Marble even, so feel free to send
a patch if you go that road :)
Regards,
Dennis
On 11.04.2013 18:59, Konrad Enzensberger wrote:
> Hi developers,
>
> for a special request i need to display the
> map (openstreetmap) with color changed to gray scaled.
>
> does anyone know which part in marblewidget sourcecode
> i have to look for changing the map tiles to gray scaled before they
> are painted?
>
> or are the map tiles combined to single image before painted?
>
> thanks, konrad
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marble-grayscale-by-disabling.diff
Type: text/x-diff
Size: 816 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20130411/938e1d8c/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marble-grayscale-by-tiledata.diff
Type: text/x-diff
Size: 624 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20130411/938e1d8c/attachment-0003.bin>
More information about the Marble-devel
mailing list