Top Description Fields Constructors Methods
java.awt.image

public Class BufferedImageFilter

extends ImageFilter
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.Hashtable, java.awt.image.ImageConsumer, .ImageFilter

The BufferedImageFilter class subclasses an ImageFilter to provide a simple means of using a single-source/single-destination image operator (BufferedImageOp) to filter a BufferedImage in the Image Producer/Consumer/Observer paradigm. Examples of these image operators are: ConvolveOp, AffineTransformOp and LookupOp.
See Also
ImageFilter, BufferedImage, BufferedImageOp

Field Summary

Modifier and TypeField and Description
pack-priv BufferedImageOp
pack-priv byte[]
pack-priv int
pack-priv int[]
pack-priv ColorModel
pack-priv int
Inherited from java.awt.image.ImageFilter:
consumer

Constructor Summary

AccessConstructor and Description
public
BufferedImageFilter(BufferedImageOp
the specified BufferedImageOp to use to filter a BufferedImage
op
)

Constructs a BufferedImageFilter with the specified single-source/single-destination operator.

Method Summary

Modifier and TypeMethod and Description
private void
private WritableRaster
public BufferedImageOp

Returns:

the operator of this BufferedImageFilter.
getBufferedImageOp
()

Returns the BufferedImageOp.

public void
imageComplete(int
the status of image loading
status
)

Overrides java.awt.image.ImageFilter.imageComplete.

Implements java.awt.image.ImageConsumer.imageComplete.

Filters the information provided in the imageComplete method of the ImageConsumer interface.
public void
setColorModel(ColorModel
the ColorModel to which to set the ColorModel of this BufferedImageFilter
model
)

Overrides java.awt.image.ImageFilter.setColorModel.

Implements java.awt.image.ImageConsumer.setColorModel.

Filters the information provided in the setColorModel method of the ImageConsumer interface.
public void
setDimensions(int
the width to which to set the width of this BufferedImageFilter
width
,
int
the height to which to set the height of this BufferedImageFilter
height
)

Overrides java.awt.image.ImageFilter.setDimensions.

Implements java.awt.image.ImageConsumer.setDimensions.

Filters the information provided in the setDimensions method of the ImageConsumer interface.
public void
setPixels(int
the X coordinate of the upper-left corner of the area of pixels to be set
x
,
int
the Y coordinate of the upper-left corner of the area of pixels to be set
y
,
int
the width of the area of pixels
w
,
int
the height of the area of pixels
h
,
ColorModel
the specified ColorModel
model
,
byte[]
the array of pixels
pixels
,
int
the offset into the pixels array
off
,
int
the distance from one row of pixels to the next in the pixels array
scansize
)

Overrides java.awt.image.ImageFilter.setPixels.

Implements java.awt.image.ImageConsumer.setPixels.

Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.
public void
setPixels(int
the X coordinate of the upper-left corner of the area of pixels to be set
x
,
int
the Y coordinate of the upper-left corner of the area of pixels to be set
y
,
int
the width of the area of pixels
w
,
int
the height of the area of pixels
h
,
ColorModel
the specified ColorModel
model
,
int[]
the array of pixels
pixels
,
int
the offset into the pixels array
off
,
int
the distance from one row of pixels to the next in the pixels array
scansize
)

Overrides java.awt.image.ImageFilter.setPixels.

Implements java.awt.image.ImageConsumer.setPixels.

Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.
Inherited from java.awt.image.ImageFilter:
clonegetFilterInstanceresendTopDownLeftRightsetHintssetProperties

Field Detail

bufferedImageOpback to summary
pack-priv BufferedImageOp bufferedImageOp
bytePixelsback to summary
pack-priv byte[] bytePixels
heightback to summary
pack-priv int height
intPixelsback to summary
pack-priv int[] intPixels
modelback to summary
pack-priv ColorModel model
widthback to summary
pack-priv int width

Constructor Detail

BufferedImageFilterback to summary
public BufferedImageFilter(BufferedImageOp op)

Constructs a BufferedImageFilter with the specified single-source/single-destination operator.

Parameters
op:BufferedImageOp

the specified BufferedImageOp to use to filter a BufferedImage

Exceptions
NullPointerException:
if op is null

Method Detail

convertToRGBback to summary
private void convertToRGB()
createDCMrasterback to summary
private WritableRaster createDCMraster()
getBufferedImageOpback to summary
public BufferedImageOp getBufferedImageOp()

Returns the BufferedImageOp.

Returns:BufferedImageOp

the operator of this BufferedImageFilter.

imageCompleteback to summary
public void imageComplete(int status)

Overrides java.awt.image.ImageFilter.imageComplete.

Implements java.awt.image.ImageConsumer.imageComplete.

Filters the information provided in the imageComplete method of the ImageConsumer interface.

Note

This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Parameters
status:int

the status of image loading

Exceptions
ImagingOpException:
if there was a problem calling the filter method of the BufferedImageOp associated with this instance.
See Also
ImageConsumer#imageComplete
setColorModelback to summary
public void setColorModel(ColorModel model)

Overrides java.awt.image.ImageFilter.setColorModel.

Implements java.awt.image.ImageConsumer.setColorModel.

Filters the information provided in the setColorModel method of the ImageConsumer interface.

If model is null, this method clears the current ColorModel of this BufferedImageFilter.

Note

This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Parameters
model:ColorModel

the ColorModel to which to set the ColorModel of this BufferedImageFilter

See Also
ImageConsumer#setColorModel
setDimensionsback to summary
public void setDimensions(int width, int height)

Overrides java.awt.image.ImageFilter.setDimensions.

Implements java.awt.image.ImageConsumer.setDimensions.

Filters the information provided in the setDimensions method of the ImageConsumer interface.

Note

This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Parameters
width:int

the width to which to set the width of this BufferedImageFilter

height:int

the height to which to set the height of this BufferedImageFilter

See Also
ImageConsumer#setDimensions
setPixelsback to summary
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)

Overrides java.awt.image.ImageFilter.setPixels.

Implements java.awt.image.ImageConsumer.setPixels.

Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of bytes.

Note

This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Parameters
x:int

Doc from java.awt.image.ImageConsumer.setPixels.

the X coordinate of the upper-left corner of the area of pixels to be set

y:int

Doc from java.awt.image.ImageConsumer.setPixels.

the Y coordinate of the upper-left corner of the area of pixels to be set

w:int

Doc from java.awt.image.ImageConsumer.setPixels.

the width of the area of pixels

h:int

Doc from java.awt.image.ImageConsumer.setPixels.

the height of the area of pixels

model:ColorModel

Doc from java.awt.image.ImageConsumer.setPixels.

the specified ColorModel

pixels:byte[]

Doc from java.awt.image.ImageConsumer.setPixels.

the array of pixels

off:int

Doc from java.awt.image.ImageConsumer.setPixels.

the offset into the pixels array

scansize:int

Doc from java.awt.image.ImageConsumer.setPixels.

the distance from one row of pixels to the next in the pixels array

Exceptions
IllegalArgumentException:
if width or height are less than zero.
See Also
ImageConsumer#setPixels(int, int, int, int, ColorModel, byte[], int, int)
setPixelsback to summary
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)

Overrides java.awt.image.ImageFilter.setPixels.

Implements java.awt.image.ImageConsumer.setPixels.

Filters the information provided in the setPixels method of the ImageConsumer interface which takes an array of integers.

Note

This method is intended to be called by the ImageProducer of the Image whose pixels are being filtered. Developers using this class to retrieve pixels from an image should avoid calling this method directly since that operation could result in problems with retrieving the requested pixels.

Parameters
x:int

Doc from java.awt.image.ImageConsumer.setPixels.

the X coordinate of the upper-left corner of the area of pixels to be set

y:int

Doc from java.awt.image.ImageConsumer.setPixels.

the Y coordinate of the upper-left corner of the area of pixels to be set

w:int

Doc from java.awt.image.ImageConsumer.setPixels.

the width of the area of pixels

h:int

Doc from java.awt.image.ImageConsumer.setPixels.

the height of the area of pixels

model:ColorModel

Doc from java.awt.image.ImageConsumer.setPixels.

the specified ColorModel

pixels:int[]

Doc from java.awt.image.ImageConsumer.setPixels.

the array of pixels

off:int

Doc from java.awt.image.ImageConsumer.setPixels.

the offset into the pixels array

scansize:int

Doc from java.awt.image.ImageConsumer.setPixels.

the distance from one row of pixels to the next in the pixels array

Exceptions
IllegalArgumentException:
if width or height are less than zero.
See Also
ImageConsumer#setPixels(int, int, int, int, ColorModel, int[], int, int)