自JRE 1.7.0_25起蜡染在转换上失败 [英] Batik fails on transformations since JRE 1.7.0_25

查看:104
本文介绍了自JRE 1.7.0_25起蜡染在转换上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我更新到JRE 1.7.0_25以来,蜡染在应用转换时会引发异常.

Since I updated to JRE 1.7.0_25, batik throws exceptions when applyling transformations.

堆栈跟踪为:

java.awt.image.ImagingOpException: Unable to transform src image
at java.awt.image.AffineTransformOp.filter(Unknown Source)
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.PadRed.copyData(PadRed.java:88)
at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88)
at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166)
at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526)
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:264)
at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455)
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
at org.apache.batik.gvt.ShapeNode.paint(ShapeNode.java:143)
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.filter.GraphicsNodeRed8Bit.genRect(GraphicsNodeRed8Bit.java:140)
at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(GraphicsNodeRed8Bit.java:116)
at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88)
at org.apache.batik.ext.awt.image.rendered.Any2LsRGBRed.copyData(Any2LsRGBRed.java:109)
at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526)
at org.apache.batik.ext.awt.image.rendered.CompositeRed.genRect(CompositeRed.java:188)
at org.apache.batik.ext.awt.image.rendered.CompositeRed.copyData(CompositeRed.java:139)
at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166)
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.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.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.filter.GraphicsNodeRed8Bit.genRect(GraphicsNodeRed8Bit.java:140)
at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(GraphicsNodeRed8Bit.java:116)
at org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(TranslateRed.java:105)
at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(DynamicRenderer.java:244)
at org.apache.batik.gvt.renderer.StaticRenderer.repaint(StaticRenderer.java:344)
at org.apache.batik.swing.gvt.GVTTreeRenderer.run(GVTTreeRenderer.java:123)

有人解决这个问题吗,或者这是JRE中的临时错误?

Does anyone how to fix this or is this a temporary bug in the JRE?

推荐答案

这是 Java 7 Update 25中的回归.更糟糕的是,Oracle似乎打算将对回归的修复推迟到Update60.这并不是像任何人都依赖Java一样.谢谢,甲骨文!

It's a regression in Java 7 Update 25. Aggravatingly, Oracle looks set to delay the fix for the regression until Update 60. It's not like anyone depends on Java for anything. Thanks, Oracle!

此信息有关如何避免该问题的信息:

There's a brief description in this post from the Batik mailing list regarding how to avoid the problem:

到目前为止,我唯一能找到的解决方法是修补BATIK 源不再直接在源上调用BufferedImageOp.filter 和目标图片,但要过滤两个ARGB BufferedImage副本.

The only workaround I have been able to find so far is patching BATIK sources to no longer call BufferedImageOp.filter directly on the source and destination image, but to filter two ARGB BufferedImage copies.

遗憾的是,这意味着必须同时复制源图像和目标图像,如果它们不是ARGB.

Regrettably, this means having to make copies of both the source and destination images if they happen not to be ARGB.

这篇关于自JRE 1.7.0_25起蜡染在转换上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆