安装原生JAI,获得黑线

时间:2010-07-07 23:37:10

标签: java jai

当我安装原生JAI时,我在缩放图像中得到黑线。有谁知道如何避免这种情况?

                    ParameterBlockJAI pb = new ParameterBlockJAI("scale");
                    pb.addSource(image);
                    pb.setParameter("xScale", (float) from.getScale());
                    pb.setParameter("yScale", (float) from.getScale());
                    pb.setParameter("xTrans", 0.0F);
                    pb.setParameter("yTrans", 0.0F);
                    pb.setParameter("interpolation", new InterpolationNearest());
                    resultingImage = JAI.create("scale", SubsampleAverageDescriptor.create(resultingImage, from.getScale(), from.getScale(), new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY)), null);

example image with black lines

2 个答案:

答案 0 :(得分:0)

我将原生JAI更新为最新的每日构建,问题就消失了。下载自daily builds

答案 1 :(得分:0)

也许这是错误之一#82或#120?