xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Cadé <Philippe.C...@swiss-as.com>
Subject Re: support for ImageReader.addIIOReadWarningListener()
Date Tue, 14 Apr 2009 14:15:36 GMT

Hello Jeremias,

Jeremias Maerki-2 wrote:
>> Here some context information: using xmlgraphics 1.3.1 via FOP to
>> transform XML to PDF, my XSLT uses external-graphics that reference CGM
>> files. CGM files are read using an ImageIO plugin.
> Interesting. CGM is a vector graphic format, right? So if you're using
> an ImageIO plugin, that means the CGM images get converted to bitmaps.
> If you can send the vector graphics against a Graphics2D interface, you
> could write an image loader plug-in and transform the images to vector
> graphics in PDF output. That's what we do with SVG or MathML, for
> example. Just an thought.

Yes, CGM is vector graphics. I went the ImageIO route at first since we
wanted to display CGM graphics in a Swing component also. I hadn't looked
into it too closely about handling CGM like SVG but I just implemented a
loader plug-in as you suggested (much much easier than I thought) and it
works well and the PDF output looks much better.

Jeremias Maerki-2 wrote:
> Just for my understanding: is your goal to simply redirect
> the warnings from the interface to the logger or do you actually want to
> provide your own IIOReadWarningListener from your client code? In the
> first case, I'd suggest just extending the ImageIO plugin for the image
> loading framework (ImageLoaderImageIO and PreloaderImageIO).

Since I am now using an image loader plug-in, I can now easily redirect the
warnings happening during the CGM processing to a logger within the plug-in,
no need to alter the ImageIO plug-in.

View this message in context: http://www.nabble.com/support-for-ImageReader.addIIOReadWarningListener%28%29-tp22971032p23040229.html
Sent from the Xml Graphics - General mailing list archive at Nabble.com.

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

View raw message