>>>>> "R" == Riyaz  <[EMAIL PROTECTED]> writes:

R> I am trying to convert a svg file that has a raster as the
R> background image and other vectors on top of it. I am using batik's
R> transcoder api.  Does batik allow this type of conversion? How can
R> I achieve this.  Currently I am getting this run-time error from
R> batik while transcoding:

   The problem is that we can't initialize the JDK Image decoder
because you are running in headless mode (since this is lazily done if
your content doesn't user rasters it is never triggered).

   One choice is to comment out the registration of the JDK Image
decoder, batik.ext.awt.image.spi.ImageTagRegistry line 273 - although
I've been told that this also disables JPEG images (which doesn't make
sense since we have a JPEGRegistryEntry - although it's possible that
this also doesn't work in headless mode).  It is expected that this
would disable GIF decoding.

   BTW the reason the JDK entry fails is because I create a component
so I can create an ImageTracker - I think this could be fixed by
implementing an ImageObserver directly.

R> Exception in thread "main" java.lang.ExceptionInInitializerError at
R> org.apache.batik.ext.awt.image.spi.ImageTagRegistry.getRegistry(Unknown
R> Source) at
R> org.apache.batik.bridge.SVGImageElementBridge.createRasterImageNode(Unknown
R> Source) at
R> org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown
R> Source) at
R> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
R> Source) at
R> org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
R> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
R> Source) at
R> org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
R> at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at
R> org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown
R> Source) at
R> org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown
R> Source) at
R> org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
R> Source) at createImageForPress.emitJPG(createImageForPress.java:65)
R> at createImageForPress.main(createImageForPress.java:44) Caused by:
R> java.awt.HeadlessException at
R> java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:121)
R> at java.awt.Label.<init>(Label.java:133) at
R> java.awt.Label.<init>(Label.java:100) at
R> org.apache.batik.ext.awt.image.spi.JDKRegistryEntry.<clinit>(Unknown
R> Source) ... 13 more

R> If I remove the raster(image tag) from the svg file it creates the
R> raster for it. Any tips or hints are greatly appreciated.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to