List of utility methods to do BufferedImage Clip
BufferedImage | clip(BufferedImage image, int[] ul, int[] lr) Clip the image int imageWidth = image.getWidth(null); int imageHeight = image.getHeight(null); int w = lr[0] - ul[0]; int h = lr[1] - ul[1]; if ((ul[0] + w <= imageWidth) && (ul[1] + h <= imageHeight) && (w > 0) && (h > 0)) { return image.getSubimage(ul[0], ul[1], w, h); System.err.println("Specified clip width/height:" + w + "/" + h + " outside of image width/height:" ... |
BufferedImage | subImage(BufferedImage image, int x, int y, int width, int height) Gets a subImage. return image.getSubimage(x, y, width, height);
|
BufferedImage | subimage(BufferedImage src, int x, int y, int w, int h) Returns a subimage of the given main image. if (!SUBIMAGE ) { return newSubimage(src, x, y, w, h); return src.getSubimage(x, y, w, h); |