@Override public BufferedImage doTransform(BufferedImage src, BufferedImage dest) { if(filter == null) { filter = new ColorHalftoneFilter(NAME); } float cyan = (float) cyanScreenAngle.getValueInIntuitiveRadians(); float magenta = (float) magentaScreenAngle.getValueInIntuitiveRadians(); float yellow = (float) yellowScreenAngle.getValueInIntuitiveRadians(); filter.setCyanScreenAngle(cyan); filter.setMagentaScreenAngle(magenta); filter.setYellowScreenAngle(yellow); filter.setdotRadius(dotRadius.getValueAsPercentage()); dest = filter.filter(src, dest); return dest; } }
int height = src.getHeight(); pt = createProgressTracker(height); dst = createCompatibleDestImage(src, null); float halfGridSize = gridSize /2; int[] outPixels = new int[width]; int[] inPixels = getRGB( src, 0, 0, width, height, null ); for ( int y = 0; y < height; y++ ) { for ( int x = 0, ix = y*width; x < width; x++, ix++ ) { setRGB( dst, 0, y, width, 1, outPixels ); finishProgressTracker();
dst = createCompatibleDestImage( src, null ); float halfGridSize = (float)gridSize/2; int[] outPixels = new int[width]; int[] inPixels = getRGB( src, 0, 0, width, height, null ); for ( int y = 0; y < height; y++ ) { for ( int x = 0, ix = y*width; x < width; x++, ix++ ) setRGB( dst, 0, y, width, 1, outPixels );