[
https://issues.apache.org/jira/browse/BATIK-1063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15977226#comment-15977226
]
Geoff Mishkin commented on BATIK-1063:
--------------------------------------
It might be a little different, because I was able to reproduce this issue on
1.8.0_60 on Mac but BATIK-1106 worked fine (Batik 1.8).
I found this issue because I was having a similar issue with my own file. Your
comment about color space reminded me to try setting
color-interpolation-filters="sRGB" on the feTile element. That worked for my
file, and this one (bad.svg), without having to change any Batik code.
Of course, if you are processing arbitrary SVG files, that may not be an
acceptable workaround. However, the way I am using feImage and feTile, I don't
think changing the value of color-interpolation-filters would have a visible
effect on the output. As this attribute is a presentation attribute, you could
have a "user agent stylesheet" with the rule {{feTile {
color-interpolation-filters: sRGB; } }}. Now if we were talking about
feComponentTransform it's a different story. That came up as part of an SVG
issue I saw on iOS.
But I'm not sure about your file (line.svg) since it was already working for
me. You could try the color-interpolation-filters thing (as opposed to changing
Batik code), but it would almost certainly require you to rework your blur
primitive, as you noticed.
> java.awt.image.ImagingOpException when using feTile over a PNG
> --------------------------------------------------------------
>
> Key: BATIK-1063
> URL: https://issues.apache.org/jira/browse/BATIK-1063
> Project: Batik
> Issue Type: Bug
> Components: SVG Rasterizer
> Affects Versions: 1.7
> Environment: java version "1.6.0_65"
> Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
> Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
> Reporter: Dan Abramov
> Attachments: bad.svg
>
>
> I can repro this both on server and locally.
> Use feTile in filter for a PNG <image>, and you'll get this exception.
> The image will be generated empty.
> java -jar ../lib/batik/batik-rasterizer.jar
> 5852da6b-3345-4e53-9472-1d8c397f45a6.svg
> About to transcode 1 SVG file(s)
> Converting 5852da6b-3345-4e53-9472-1d8c397f45a6.svg to
> 5852da6b-3345-4e53-9472-1d8c397f45a6.png ...
> java.awt.image.ImagingOpException: Unable to transform src image
> at java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:267)
> at
> org.apache.batik.ext.awt.image.rendered.AffineRed.genRect(AffineRed.java:193)
> at
> org.apache.batik.ext.awt.image.rendered.AffineRed.copyData(AffineRed.java:109)
> at
> org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166)
> at
> org.apache.batik.ext.awt.image.rendered.FormatRed.copyData(FormatRed.java:116)
> at
> org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:347)
> at
> org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455)
> at
> org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135)
> at
> org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
> at
> org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(FilterChainRable8Bit.java:251)
> at
> org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
> at
> org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
> at org.apache.batik.gvt.ImageNode.paint(ImageNode.java:71)
> at
> org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
> at
> org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
> at
> org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
> at
> org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:159)
> at
> org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
> at
> org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
> at
> org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
> at
> org.apache.batik.gvt.renderer.MacRenderer.repaint(MacRenderer.java:361)
> at
> org.apache.batik.gvt.renderer.MacRenderer.repaint(MacRenderer.java:291)
> at
> org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:111)
> 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)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]