Helder Magalhães schrieb:
Hi simon,
hi helder,

thanks very much for your response.

i have developed a yanel resource-type which is using the batik transcoder
to create png and jpg from svg. on my local computer everything works like a
charm. after i deployed it on a haedless server i run into a problem. i
tried Djava.awt.headless=true and xvfb. and a real simple svg worked fine
but for most cases i get an exception (see below). after this exception was
thrown even the simple svg which worked before throws the exception.

Maybe you got caught by bug 42408 [1]? Could you try downloading the
source [2] and apply the available patch [1] locally and see if it
helps? Please reply back (or comment on the bug report) if so. ;-)
unfortunately i could not apply the patch to source of 1.7 and as i understand the comments in the bug 42408 the patch has already been applied to trunk. so i just checked out the trunk and tried the rasterizer:

si...@debian:~/batik-test/batik-trunk/batik-1.8pre$ java -Djava.awt.headless=true -jar batik-rasterizer.jar test.svg
About to transcode 1 SVG file(s)

Converting test.svg to test.png ... java.lang.IllegalArgumentException: Color parameter outside of expected range: Alpha Green
       at java.awt.Color.testColorValueRange(Color.java:298)
       at java.awt.Color.<init>(Color.java:382)
       at org.apache.batik.bridge.PaintServer.convertColor(Unknown Source)
at org.apache.batik.bridge.CSSUtilities.convertStopColor(Unknown Source) at org.apache.batik.bridge.AbstractSVGGradientElementBridge$SVGStopElementBridge.createStop(Unknown Source) at org.apache.batik.bridge.AbstractSVGGradientElementBridge.extractLocalStop(Unknown Source) at org.apache.batik.bridge.AbstractSVGGradientElementBridge.extractStop(Unknown Source) at org.apache.batik.bridge.AbstractSVGGradientElementBridge.createPaint(Unknown Source) at org.apache.batik.bridge.PaintServer.convertURIPaint(Unknown Source)
       at org.apache.batik.bridge.PaintServer.convertPaint(Unknown Source)
at org.apache.batik.bridge.PaintServer.convertFillPaint(Unknown Source) at org.apache.batik.bridge.PaintServer.convertFillAndStroke(Unknown Source) at org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(Unknown Source) at org.apache.batik.bridge.SVGCircleElementBridge.createShapePainter(Unknown Source) at org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
       at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
       at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
       at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
       at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source)
       at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
       at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
... error (SVGConverter.error.while.rasterizing.file)


Caused by: java.lang.IllegalArgumentException: Color parameter outside of 
expected range: Alpha Red
 at java.awt.Color.testColorValueRange(Color.java:298)
[...]
The exception is somehow weird so I'd ask you to attach a simple test
case [3] which reproduces the issue in a reply, so one can see if
that's really what's happening. Thanks! :-)
instead of writing a test i just tried the batik-rasterizer on my headless system and got the following (same) exception: si...@debian:~/batik-test/batik-1.7$ java -Djava.awt.headless=true -jar batik-rasterizer.jar test.svg
About to transcode 1 SVG file(s)

Converting test.svg to test.png ... java.lang.IllegalArgumentException: Color parameter outside of expected range: Alpha Green Blue
       at java.awt.Color.testColorValueRange(Color.java:298)
       at java.awt.Color.<init>(Color.java:382)
at org.apache.batik.bridge.PaintServer.convertColor(PaintServer.java:449) at org.apache.batik.bridge.CSSUtilities.convertStopColor(CSSUtilities.java:864) at org.apache.batik.bridge.AbstractSVGGradientElementBridge$SVGStopElementBridge.createStop(AbstractSVGGradientElementBridge.java:330) at org.apache.batik.bridge.AbstractSVGGradientElementBridge.extractLocalStop(AbstractSVGGradientElementBridge.java:237) at org.apache.batik.bridge.AbstractSVGGradientElementBridge.extractStop(AbstractSVGGradientElementBridge.java:189) at org.apache.batik.bridge.AbstractSVGGradientElementBridge.createPaint(AbstractSVGGradientElementBridge.java:70) at org.apache.batik.bridge.PaintServer.convertURIPaint(PaintServer.java:359) at org.apache.batik.bridge.PaintServer.convertPaint(PaintServer.java:259) at org.apache.batik.bridge.PaintServer.convertFillPaint(PaintServer.java:228) at org.apache.batik.bridge.PaintServer.convertFillAndStroke(PaintServer.java:146) at org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(SVGShapeElementBridge.java:117) at org.apache.batik.bridge.SVGCircleElementBridge.createShapePainter(SVGCircleElementBridge.java:123) at org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(SVGShapeElementBridge.java:91) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
       at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208) at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156) at org.apache.batik.apps.rasterizer.SVGConverter.transcode(SVGConverter.java:1001) at org.apache.batik.apps.rasterizer.SVGConverter.execute(SVGConverter.java:717)
       at org.apache.batik.apps.rasterizer.Main.execute(Main.java:938)
       at org.apache.batik.apps.rasterizer.Main.main(Main.java:992)
... error (SVGConverter.error.while.rasterizing.file)

i also will try to find another haedless system to reproduce the problem.

but still, any help would be very much appreciated.

thanks
simon


any hint would be very much appreciated.

Hope this helps,
 Helder


[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=42408
[2] http://xmlgraphics.apache.org/batik/download.cgi#Subversion+repository
[3] http://webkit.org/quality/reduction.html

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to