APIdia Launch Partner
Top Description Methods
java.awt.image

public Interface RenderedImage

Known Direct Subinterfaces
java.awt.image.WritableRenderedImage
Known Direct Implementers
com.sun.imageio.plugins.common.SimpleRenderedImage, com.sun.imageio.plugins.tiff.TIFFRenderedImage
Imports
java.awt.Rectangle, java.util.Dictionary, .Vector

RenderedImage is a common interface for objects which contain or can produce image data in the form of Rasters. The image data may be stored/produced as a single tile or a regular array of tiles.

Method Summary

Modifier and TypeMethod and Description
public WritableRaster

Returns:

a reference to the supplied or created WritableRaster.
copyData
(WritableRaster
a WritableRaster to hold the returned portion of the image, or null.
raster
)

Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster.

public ColorModel

Returns:

the ColorModel of this image.
getColorModel
()

Returns the ColorModel associated with this image.

public Raster

Returns:

the image as one large tile.
getData
()

Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over).

public Raster

Returns:

the region of the RenderedImage indicated by the specified Rectangle.
getData
(Rectangle
the region of the RenderedImage to be returned.
rect
)

Computes and returns an arbitrary region of the RenderedImage.

public int

Returns:

the height of this RenderedImage.
getHeight
()

Returns the height of the RenderedImage.

public int

Returns:

the minimum tile index in the X direction.
getMinTileX
()

Returns the minimum tile index in the X direction.

public int

Returns:

the minimum tile index in the X direction.
getMinTileY
()

Returns the minimum tile index in the Y direction.

public int

Returns:

the X coordinate of this RenderedImage.
getMinX
()

Returns the minimum X coordinate (inclusive) of the RenderedImage.

public int

Returns:

the Y coordinate of this RenderedImage.
getMinY
()

Returns the minimum Y coordinate (inclusive) of the RenderedImage.

public int

Returns:

the number of tiles in the X direction.
getNumXTiles
()

Returns the number of tiles in the X direction.

public int

Returns:

the number of tiles in the Y direction.
getNumYTiles
()

Returns the number of tiles in the Y direction.

public Object

Returns:

the property indicated by the specified name.
getProperty
(String
the name of the property
name
)

Gets a property from the property set of this image.

public String[]

Returns:

a String array containing all of the property names that getProperty(String) recognizes; or null if no property names are recognized.
getPropertyNames
()

Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.

public SampleModel

Returns:

the SampleModel of this image.
getSampleModel
()

Returns the SampleModel associated with this image.

public Vector<RenderedImage>

Returns:

a Vector of RenderedImage objects.
getSources
()

Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage.

public Raster

Returns:

the tile given the specified indices.
getTile
(int
the X index of the requested tile in the tile array
tileX
,
int
the Y index of the requested tile in the tile array
tileY
)

Returns tile (tileX, tileY).

public int

Returns:

the X offset of the tile grid relative to the origin.
getTileGridXOffset
()

Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0).

public int

Returns:

the Y offset of the tile grid relative to the origin.
getTileGridYOffset
()

Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0).

public int

Returns:

the tile height in pixels.
getTileHeight
()

Returns the tile height in pixels.

public int

Returns:

the tile width in pixels.
getTileWidth
()

Returns the tile width in pixels.

public int

Returns:

the width of this RenderedImage.
getWidth
()

Returns the width of the RenderedImage.

Method Detail

copyDataback to summary
public WritableRaster copyData(WritableRaster raster)

Computes an arbitrary rectangular region of the RenderedImage and copies it into a caller-supplied WritableRaster. The region to be computed is determined from the bounds of the supplied WritableRaster. The supplied WritableRaster must have a SampleModel that is compatible with this image. If raster is null, an appropriate WritableRaster is created.

Parameters
raster:WritableRaster

a WritableRaster to hold the returned portion of the image, or null.

Returns:WritableRaster

a reference to the supplied or created WritableRaster.

getColorModelback to summary
public ColorModel getColorModel()

Returns the ColorModel associated with this image. All Rasters returned from this image will have this as their ColorModel. This can return null.

Returns:ColorModel

the ColorModel of this image.

getDataback to summary
public Raster getData()

Returns the image as one large tile (for tile based images this will require fetching the whole image and copying the image data over). The Raster returned is a copy of the image data and will not be updated if the image is changed.

Returns:Raster

the image as one large tile.

getDataback to summary
public Raster getData(Rectangle rect)

Computes and returns an arbitrary region of the RenderedImage. The Raster returned is a copy of the image data and will not be updated if the image is changed.

Parameters
rect:Rectangle

the region of the RenderedImage to be returned.

Returns:Raster

the region of the RenderedImage indicated by the specified Rectangle.

getHeightback to summary
public int getHeight()

Returns the height of the RenderedImage.

Returns:int

the height of this RenderedImage.

getMinTileXback to summary
public int getMinTileX()

Returns the minimum tile index in the X direction.

Returns:int

the minimum tile index in the X direction.

getMinTileYback to summary
public int getMinTileY()

Returns the minimum tile index in the Y direction.

Returns:int

the minimum tile index in the X direction.

getMinXback to summary
public int getMinX()

Returns the minimum X coordinate (inclusive) of the RenderedImage.

Returns:int

the X coordinate of this RenderedImage.

getMinYback to summary
public int getMinY()

Returns the minimum Y coordinate (inclusive) of the RenderedImage.

Returns:int

the Y coordinate of this RenderedImage.

getNumXTilesback to summary
public int getNumXTiles()

Returns the number of tiles in the X direction.

Returns:int

the number of tiles in the X direction.

getNumYTilesback to summary
public int getNumYTiles()

Returns the number of tiles in the Y direction.

Returns:int

the number of tiles in the Y direction.

getPropertyback to summary
public Object getProperty(String name)

Gets a property from the property set of this image. The set of properties and whether it is immutable is determined by the implementing class. This method returns java.awt.Image.UndefinedProperty if the specified property is not defined for this RenderedImage.

Parameters
name:String

the name of the property

Returns:Object

the property indicated by the specified name.

See Also
java.awt.Image#UndefinedProperty
getPropertyNamesback to summary
public String[] getPropertyNames()

Returns an array of names recognized by getProperty(String) or null, if no property names are recognized.

Returns:String[]

a String array containing all of the property names that getProperty(String) recognizes; or null if no property names are recognized.

getSampleModelback to summary
public SampleModel getSampleModel()

Returns the SampleModel associated with this image. All Rasters returned from this image will have this as their SampleModel.

Returns:SampleModel

the SampleModel of this image.

getSourcesback to summary
public Vector<RenderedImage> getSources()

Returns a vector of RenderedImages that are the immediate sources of image data for this RenderedImage. This method returns null if the RenderedImage object has no information about its immediate sources. It returns an empty Vector if the RenderedImage object has no immediate sources.

Returns:Vector<RenderedImage>

a Vector of RenderedImage objects.

getTileback to summary
public Raster getTile(int tileX, int tileY)

Returns tile (tileX, tileY). Note that tileX and tileY are indices into the tile array, not pixel locations. The Raster that is returned is live and will be updated if the image is changed.

Parameters
tileX:int

the X index of the requested tile in the tile array

tileY:int

the Y index of the requested tile in the tile array

Returns:Raster

the tile given the specified indices.

getTileGridXOffsetback to summary
public int getTileGridXOffset()

Returns the X offset of the tile grid relative to the origin, i.e., the X coordinate of the upper-left pixel of tile (0, 0). (Note that tile (0, 0) may not actually exist.)

Returns:int

the X offset of the tile grid relative to the origin.

getTileGridYOffsetback to summary
public int getTileGridYOffset()

Returns the Y offset of the tile grid relative to the origin, i.e., the Y coordinate of the upper-left pixel of tile (0, 0). (Note that tile (0, 0) may not actually exist.)

Returns:int

the Y offset of the tile grid relative to the origin.

getTileHeightback to summary
public int getTileHeight()

Returns the tile height in pixels. All tiles must have the same height.

Returns:int

the tile height in pixels.

getTileWidthback to summary
public int getTileWidth()

Returns the tile width in pixels. All tiles must have the same width.

Returns:int

the tile width in pixels.

getWidthback to summary
public int getWidth()

Returns the width of the RenderedImage.

Returns:int

the width of this RenderedImage.