Batik fails on transformations since JRE 1.7.0_25

萝らか妹 提交于 2019-12-04 14:54:45

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:

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.

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

Dan Abramov

Thomas Behr (the guy who wrote this post) created a patch that fixes the issue using the workaround described in the sibling answer.

He kindly sent it to me when I asked him, and since numerous people contacted me about this patch, I decided to publish it in good faith that Thomas doesn't mind it.

Apply it on top of Batik 1.7 sources and you should be fine.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!