安装原生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);
When I install native JAI I get black lines in my scaled images. Does anyone know how to avoid this?
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);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将本机 JAI 更新到最新的每日构建,问题就消失了。从每日构建下载
I updated native JAI to the latest daily build and the problem went away. Downloaded from daily builds
也许这是错误之一 #82 或 #120 ?
Maybe it’s one of the bugs #82 or #120?