public RecodeRaster( final RenderedImage image, final double srcVal, final double destVal, final RenderingHints hints) { super(image, (ImageLayout) hints.get(JAI.KEY_IMAGE_LAYOUT), hints, false); this.srcVal = srcVal; this.destVal = destVal; permitInPlaceOperation(); }
public RenderedImage create(ParameterBlock paramBlock, RenderingHints renderHints) { RenderedImage source = paramBlock.getRenderedSource(0); ImageLayout layout = renderHints == null ? null : (ImageLayout) renderHints.get(JAI.KEY_IMAGE_LAYOUT); String algorism = (String) paramBlock.getObjectParameter(0); int level = paramBlock.getIntParameter(1); Vector[] coefs = (Vector[]) paramBlock.getObjectParameter(2); return new QuantizationOpImage(source, layout, renderHints, algorism, level, coefs); }