You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Franck Mangin <fr...@gmail.com> on 2005/10/19 20:36:55 UTC

Custom image providers for transcoder

Hi,

I am very new to Batik & SVG so I apologize if this has been asked before,
but I couldn't find an answer despite an extensive search through the
archives.

I am trying to customize a transcoder (e.g. the PNG transcoder) so that I
can control how the transcoder obtains the images that are contained in an
SVG document it is transcoding.
Specifically, my SVG document contains an image, say coffe_cup.jpg, and in
the backend I have several versions of that image at various resolutions,
possibly stored on totally unrelated medias (file system, remote URL,
DB...).

What I would like is for transcoder to call me when it needs the image data,
specifying what size it needs, so that I can pick the best source to pull
the data from.

The ImageHandler interfaces on the generator side don't seem to have an
equivalent in the Transcoder side? I looked into custom url handlers,
subclassing the Bridge interfaces, and the material on the "Extending Batik"
page, but I can't quite figure out which approach is the right one.

Any help would be greatly appreciated!

Thanks,
Franck