[OSM-talk] SVG to PNG without burning lots of memory
Ronan Oger
ronan at roasp.com
Mon Jul 24 17:06:01 BST 2006
Here are some more SVG to PNG options:
1) batik rasteriser
2) ksvgtopng on (kde)
Regarding your 7MB of xml bloat... You may consider (1) optimizing your LOD
(level of detail) to best match the expected screen size before generating
the svg image. (2) optimizing the SVG output for the smallest possible
content (3) gzipping the svg.
If you want to send me a sample of the output, I can take a look at it and
offer you some hints.
Your big problem is that SVG needs the entire document modelled in ram as a
canvas before it can proceed and dump the contents to screen. Crazy-high
resolution in the data causes crazy-high memory usage.
Ronan
svg hack
On Tuesday 18 July 2006 11:28, Simon Hewison wrote:
> Quick question to the list.
>
> I've been doing some rather nice maps with osmarender, and have the need to
> convert to a PNG. The maps are of a rather large area (about 250 sq km),
> and the SVG comes to 7 megabytes of typical XML bloat.
>
> Surely there must be a simple way of converting a 7MB input file to a
> 1024x768 bitmap png without running out of memory on a 512MB machine?
>
> I've tried Inkscape, which is known to be REALLY memory hungry, it crashes
> out with failure to allocate memory.
>
> I've tried Gimp, which just hangs.
>
> Even Firefox just crawls on this input.
>
> Has anyone got any suggestions on an efficient SVG to PNG conversion?
More information about the talk
mailing list