
Hierar chy: Object→ ColorModel(Transparency)→ PackedColorModel
Subc lasses: DirectColorModel
PixelGrabber Ja va 1.0
java.awt.image PJ1.1
This class is an ImageConsumer that extracts a specified rectangular array of pixels (in the
default RGB color model) from a specified Image or ImageProducer and stores them in a
specified array (using the specified offset into the array and specified scanline size).
Use this class when you want to inspect or manipulate the data of an image or some
rectangular portion of an image.
The method grabPixels() makes the PixelGrabber start grabbing pixels. status() retur ns the
status of the pixel-grabbing process. The retur n value uses the same flag value con-
stants that the ImageObser ver class does. The remaining methods are the standard Image-
Consumer methods and should not be called directly.
public class PixelGrabber implements ImageConsumer {
// Public Constructors
1.1 public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB);
public PixelGrabber(ImageProducer ip, int x, int y, int w, int h, int[ ] pix, int off, int scansize);
public PixelGrabber(Image img, int x, int y, int w, int h, int[ ] pix, int off, int scansize);
// Property Accessor Methods (by property name)
synchronized1.1 public ColorModel getColorModel();
Implements:ImageConsumer emptypublic void setColorModel(ColorModel model);
synchronized1.1 public int getHeight();
synchronized1.1