xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helder Magalhães <helder.magalh...@gmail.com>
Subject Re: Transcoder / Document reuse.
Date Tue, 14 Apr 2009 21:51:57 GMT
Hi David,


> I've created a GIF transcoder class which extends the PNGTranscoder class,
> but returns the images as GIF rather than PNG.  Preferably I'd want to
> override a class that rendered to a BufferedImage, which I could then use
> directly with the gif creation library I'm using
> (http://www.fmsware.com/stuff/gif.html).

This sounds great. I'm not sure about potential legal issues in
integrating the LZW patented code into Batik (can anyone comment on
this?), but it would be great if you'd consider contributing this
(extra output format) to the project. ;-)


> The main reason for doing so is to produce animated GIFs from SVGs.
>  Basically the idea is to call the transcoder multiple times, once for each
> frame in the loop, specifying the KEY_SNAPSHOT_TIME hint to the transcoder
> each time to get a PNG image for that moment in time.  The image results
> from those multiple calls to transcode() are then packaged together and
> passed back out of the transcode() call as an assembled animated GIF.

Without digging deep into the actual question you pose, this made me
recall a somehow recent thread in SVG Developers [1] where similarly
animated SVG to video was discussed. One of the simplest (yet probably
with more potential) was just rendering the file directly in squiggle
and make a screen capture in the desired format... :-)

On the other hand, using the GIF will automatically reduce the color
palette to 256 colors, which will not happen with APNG [2]. If you are
not targeting old browsers versions or IE in particular, why not
consider using this somehow new and promising format? ;-) Of course
you may setup the transcoder to use an indexed palette, if that's
really intended...


Hope this helps,
 Helder Magalhães


[1] http://tech.groups.yahoo.com/group/svg-developers/message/61947
[2] http://en.wikipedia.org/wiki/APNG

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message