[LIBART] SVG-to-SDL Rendering with rsvg



Hi,
I've tried twice to email the author of the "rsvg"
renderer for SVG (Raph Levien), but haven't
gotten replies and the second attempt bounced, so
I may have an unreliable address.

This is the software used (I believe) in
Gill and in other Gnome projects.

As originally written, it reads an SVG file and
converts it to a bitmap file using the LibArt
library.  For my application, I need to embed rsvg
into a Python extension module, alter the input
to accept a string (instead of a file-handle), 
and to convert the output into an SDL surface (the
multimedia library I'm using is Loki's SDL,
http://www.libsdl.org ), instead of writing it out
as a file.

I've converted the input to accept a string
in a very minimal way, although I do have
some questions about the interaction with
the parser, such as why I need to give it
3 to 10 character chunks instead of just
passing the whole string.

But the question on-topic for this list is what
to do with the LibArt behavior.  By default at
least, rsvg seems to do an anti-aliased full-color
image. I would prefer to work with simple 8-bit palette
graphics for this application, so I wonder if there's
a way to make the rendering work that way, since
it seems very inefficient to do an anti-aliased
rendering and then a color-reduction to convert 
back to palette graphics (both are expensive
algorithms).  In principle, it should be a lot faster
to just use the original SVG color palette.

Thanks, I hope this is sufficiently topical
for this list.

-- 
Terry Hancock
hancock earthlink net





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]