ImageFilter

Name

ImageFilter

[Graphic: Figure from the text]

Description

The ImageFilter class sits between the ImageProducer and ImageConsumer as an image is being created to provide a filtered version of that image. Image filters are always used in conjunction with a FilteredImageSource. As an implementer of the ImageConsumer interface, an image filter receives pixel data from the original image's source and delivers it to another image consumer. The ImageFilter class implements a null filter (i.e., the new image is the same as the original); to produce a filter that modifies an image, create a subclass of ImageFilter.

Class Definition

public class java.awt.image.ImageFilter extends java.lang.Object implements java.awt.image.ImageConsumer, java.lang.Cloneable {
 // Variables protected ImageConsumer consumer; // Constructors public ImageFilter(); // Instance Methods public Object clone();
public ImageFilter getFilterInstance (ImageConsumer ic);
public void imageComplete (int status);
public void resendTopDownLeftRight (ImageProducer ip);
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);
}

Protected Variables

consumer

protected ImageConsumer consumer

The consumer variable is a reference to the actual ImageConsumer for the Image.

Constructors

ImageFilter

public ImageFilter()

Instance Methods

clone

public Object clone()

getFilterInstance

public ImageFilter getFilterInstance (ImageConsumer ic)

imageComplete

void imageComplete (int status)

resendTopDownLeftRight

public void resendTopDownLeftRight (ImageProducer ip)

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)

See Also

Cloneable, ColorModel, CropImageFilter, Hashtable, ImageConsumer, ImageProducer, Object, ReplicateImageFilter, RGBImageFilter