[OSM-talk] SVG to PNG without burning lots of memory

Raphael Jacquot sxpert at esitcom.org
Mon Jul 24 20:51:07 BST 2006


Simon Hewison wrote:

> Okay, even if SVG is using a Document Object Model, then 7MB of XML
> bloat should become less than 7MB in RAM. That's no big deal. I've got
> many orders of magnitude more than that on my desktop machine. Gzipping
> the SVG will NOT help the memory footprint when the renderer models the
> entire lot into it's in-memory structures, since the first thing it will
> do is decompress it.
> 
> As for the memory footprint for a 32 bit uncompressed bitmap for it to
> render into, that's still not a huge amount of memory these days. It was
> a decade and half ago when laser printers had the same problem. 4 bytes
> per pixel x 2048 x 1538 resolution is still only just a bit over 12MB..
> So why can't I take my 7MB of (xml padded) data into RAM, and turn it
> into a 12MB canvas without burning over 250MB of RAM?
> 
> It seems that software authors have forgotten the concept of efficient
> coding these days. If I had the time, I'd sit down and write an
> efficient SVG renderer. Sadly, I haven't the time.
> 

doesn't rsvg-convert do what you need ?




More information about the talk mailing list