[FRPythoneers] SVG -> bitmap tools?

Matt Gushee mgushee at havenrock.com
Mon Apr 22 18:24:36 MDT 2002

On Mon, Apr 22, 2002 at 05:21:27PM -0600, Karl Putland wrote:
> > 
> > I'm working on a project that requires converting SVG graphics to
> > bitmap (preferably PNG or GIF). Does anyone know of a Python library
> Look at the graphics package of ReportLab.  I believe that SVG -->
> bitmap is what it does.

Thanks, Karl. Am I right in thinking you haven't tried that yourself?
I also read something that gave me that impression, but I don't think
that's the current reality. I've got RL 1.13 installed, also PIL and
ReportLab's renderPM extension (which outputs bitmap images), but I
don't see any code that handles SVG. There would have to be a parser
for it somewhere, and I don't see that. Also,

  bash-2.03$ cd /usr/local/lib/python2.1/site-packages/reportlab/
  bash-2.03$ grep -i svg */*.py
  graphics/renderPDF.py:    needed outside of the state info in the SVG model."""
  graphics/renderPDF.py:                #this has different semantics in PDF to SVG;
  ... and other comments and docstrings, all in the graphics/ subdir. No
  variable, class, or method names containing the string 'svg' or 'SVG'.

There are also some references in the User's Guide and the Graphics Guide
to SVG support coming in the near future, but no more than that. So it
looks to me like some or all of the infrastructure to support SVG is in
place, but no code to actually process SVG files.

Matt Gushee
Englewood, Colorado, USA
mgushee at havenrock.com

More information about the FRPythoneers mailing list