public ImageProcessor crop() { ImageProcessor ip2 = createProcessor(roiWidth, roiHeight); byte[] pixels2 = (byte[])ip2.getPixels(); for (int ys=roiY; ys<roiY+roiHeight; ys++) { int offset1 = (ys-roiY)*roiWidth; int offset2 = ys*width+roiX; for (int xs=0; xs<roiWidth; xs++) pixels2[offset1++] = pixels[offset2++]; } return ip2; }
/** Returns a duplicate of this image. */ public ImageProcessor duplicate() { ImageProcessor ip2 = createProcessor(width, height); byte[] pixels2 = (byte[])ip2.getPixels(); System.arraycopy(pixels, 0, pixels2, 0, width*height); return ip2; }
/** Returns a duplicate of this image. */ public ImageProcessor duplicate() { ImageProcessor ip2 = createProcessor(width, height); byte[] pixels2 = (byte[])ip2.getPixels(); System.arraycopy(pixels, 0, pixels2, 0, width*height); return ip2; }
public ImageProcessor crop() { ImageProcessor ip2 = createProcessor(roiWidth, roiHeight); byte[] pixels2 = (byte[])ip2.getPixels(); for (int ys=roiY; ys<roiY+roiHeight; ys++) { int offset1 = (ys-roiY)*roiWidth; int offset2 = ys*width+roiX; for (int xs=0; xs<roiWidth; xs++) pixels2[offset1++] = pixels[offset2++]; } return ip2; }
if (dstHeight!=height) dstCenterY+=yScale/4.0; ImageProcessor ip2 = createProcessor(dstWidth, dstHeight); byte[] pixels2 = (byte[])ip2.getPixels(); int inc = getProgressIncrement(dstWidth,dstHeight);
if (dstHeight!=height) dstCenterY+=yScale/4.0; ImageProcessor ip2 = createProcessor(dstWidth, dstHeight); byte[] pixels2 = (byte[])ip2.getPixels(); int inc = getProgressIncrement(dstWidth,dstHeight);