public static Image crop(Image i, Rectangle bounds) {
		BufferedImage newImage =
			new BufferedImage(bounds.width, bounds.height, BufferedImage.TYPE_INT_ARGB);
		Graphics g = newImage.getGraphics();
		g.drawImage(i, -bounds.x, -bounds.y, null);
		waitForImage(null, newImage);
		return newImage;
	}
Crops the given image, keeping the given bounds

@param i the image to crop
@param bounds the new bounds
@return a new image based on the given image, cropped to the given bounds.
Ghidra/Framework/Gui/src/main/java/generic/util/image/ImageUtils.java