PixelGrabber

Name

PixelGrabber

[Graphic: Figure from the text]

Description

The PixelGrabber class is an ImageConsumer that captures the pixels from an image and saves them in an array.

Class Definition

public class java.awt.image.PixelGrabber extends java.lang.Object implements java.awt.image.ImageConsumer {
 // Constructors public PixelGrabber (Image img, int x, int y, int w, int h, boolean forceRGB); public PixelGrabber (Image image, int x, int y, int width, int height, int[] pixels, int offset, int scansize);
public PixelGrabber (ImageProducer ip, int x, int y, int width, int height, int[] pixels, int offset, int scansize); // Instance Methods public synchronized void abortGrabbing(); public synchronized ColorModel getColorModel(); public synchronized int getHeight(); public synchronized Object getPixels(); public synchronized int getStatus(); public synchronized int getWidth(); public boolean grabPixels() throws InterruptedException;
public synchronized boolean grabPixels (long ms) throws InterruptedException;
public synchronized void imageComplete (int status);
public void setColorModel (ColorModel model);
public void setDimensions (int width, int height);
public void setHints (int hints);
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);
public synchronized void startGrabbing(); public synchronized int status(); (Deprecated)
}

Constructors

PixelGrabber

public PixelGrabber (Image img, int x, int y, int w, int h, boolean forceRGB)

public PixelGrabber (Image image, int x, int y, int width, int height, int[] pixels, int offset, int scansize)

public PixelGrabber (ImageProducer ip, int x, int y, int width, int height, int[] pixels, int offset, int scansize)

Instance Methods

abortGrabbing

public synchronized void abortGrabbing()

getColorModel

public synchronized ColorModel getColorModel()

getHeight

public synchronized int getHeight()

getPixels

public synchronized Object getPixels()

getStatus

public synchronized int getStatus()

getWidth

public synchronized int getWidth()

grabPixels

public boolean grabPixels() throws InterruptedException

public synchronized boolean grabPixels (long ms) throws InterruptedException

imageComplete

public synchronized void imageComplete (int status)

setColorModel

void setColorModel (ColorModel model)

setDimensions

void setDimensions (int width, int height)

setHints

void setHints (int hints)

setPixels

void setPixels (int x, int y, int width, int height, ColorModel model, byte[] pixels, int offset, int scansize)

void setPixels (int x, int y, int width, int height, ColorModel model, int[] pixels, int offset, int scansize)

setProperties

void setProperties (Hashtable properties)

startGrabbing

public synchronized void startGrabbing()

status

public synchronized int status () (Deprecated)

See Also

ColorModel, Hashtable, Image, ImageConsumer, ImageProducer, InterruptedException, MemoryImageSource, Object