The CropImageFilter class creates a smaller image by cropping (i.e., extracting a rectangular region from) a larger image.
public class java.awt.image.CropImageFilter extends java.awt.image.ImageFilter { // Constructors public CropImageFilter (int x, int y, int width, int height); // Instance Methods public void setDimensions (int width, int height); public void setPixels (int x, int y, int width, int height, ColorModel model, byte[] pixels, int offset, int scansize); public void setPixels (int x, int y, int width, int height, ColorModel model, int[] pixels, int offset, int scansize); public void setProperties (Hashtable properties); }
x-coordinate of top-left corner of piece to crop.
y-coordinate of top-left corner of piece to crop.
Width of image to crop.
Height of image to crop.
Constructs a CropImageFilter that crops the specified region from the original image.
Ignored parameter.
Ignored parameter.
ImageFilter.setDimensions(int, int)
Called with the original image's dimensions; these dimensions are ignored. The method in turn calls the ImageConsumer with the dimensions of the cropped image.
x-coordinate of top-left corner of pixel data delivered with this method call.
y-coordinate of top-left corner of pixel data delivered with this method call.
Width of the rectangle of pixel data delivered with this method call.
Height of the rectangle of pixel data delivered with this method call.
Color model of image data.
Image data.
Offset from beginning of the pixels array.
Size of each line of data in pixels array.
ImageFilter.setPixels(int, int, int, int, ColorModel, byte[], int, int)
Receives a rectangle of image data from the ImageProducer; crops these pixels and delivers them to any ImageConsumers.
x-coordinate of top-left corner of pixel data delivered with this method call.
y-coordinate of top-left corner of pixel data delivered with this method call.
Width of the rectangle of pixel data delivered with this method call.
Height of the rectangle of pixel data delivered with this method call.
Color model of image data.
Image data.
Offset from beginning of the pixels array.
Size of each line of data in pixels array.
ImageFilter.setPixels(int, int, int, int, ColorModel, int[], int, int)
Receives a rectangle of image data from the ImageProducer; crops these pixels and delivers them to any ImageConsumers.
The properties for the image.
ImageFilter.setProperties(Hashtable)
Adds the "croprect" image property to the properties list.
ColorModel, Hashtable, ImageFilter