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);