dcsimg

How do I create an new image as part (rectangle) of a source image?

John Zukowski

Look at using the CropImageFilter.

Image image = ...;
ImageFilter filter = new CropImageFilter(x,y,width,height);
Image newImage = createImage(new FilteredImageSource(image.getSource(), filter));