javax.imageio
public class IIOImage extends Object
| Field Summary | |
|---|---|
| protected RenderedImage | image
Image data as a RenderedImage. null if this IIOImage uses the
Raster representation. |
| protected IIOMetadata | metadata
Image metadata. |
| protected Raster | raster
Image data as a Raster. null if this IIOImage uses the
RenderedImage representation. |
| protected List<? extends BufferedImage> | thumbnails
A list of BufferedImage thumbnails of this image. |
| Constructor Summary | |
|---|---|
| IIOImage(Raster raster, List<? extends BufferedImage> thumbnails, IIOMetadata metadata)
Construct an IIOImage containing raster image data, thumbnails
and metadata.
| |
| IIOImage(RenderedImage image, List<? extends BufferedImage> thumbnails, IIOMetadata metadata)
Construct an IIOImage containing rendered image data, thumbnails
and metadata.
| |
| Method Summary | |
|---|---|
| IIOMetadata | getMetadata()
Retrieve the image metadata or null if there is no metadata
associated with this IIOImage.
|
| int | getNumThumbnails()
Retrieve the number of thumbnails in this IIOImage.
|
| Raster | getRaster()
Retrieve the raster image data stored in this IIOImage or null if
this image stores data using the RenderedImage representation.
|
| RenderedImage | getRenderedImage()
Retrieve the rendered image data stored in this IIOImage or null
if this image stores data using the Raster representation.
|
| BufferedImage | getThumbnail(int index)
Retrieve the thumbnail stored at the specified index in the
thumbnails list.
|
| List<? extends BufferedImage> | getThumbnails()
Retrieve the list of thumbnails or null if there are no
thumbnails associated with this IIOImage. |
| boolean | hasRaster()
Check whether this IIOImage stores its image data as a Raster or
as a RenderedImage.
|
| void | setMetadata(IIOMetadata metadata)
Set this IIOImage's metadata.
|
| void | setRaster(Raster raster)
Set the raster data for this image. |
| void | setRenderedImage(RenderedImage image)
Set the rendered image data for this image. |
| void | setThumbnails(List<? extends BufferedImage> thumbnails)
Set the list of thumbnails for this IIOImage to a new list of
BufferedImages or to null. |
Parameters: raster image data thumbnails a list of BufferedImage thumbnails or null metadata image metadata or null
Throws: IllegalArgumentException if raster is null
Parameters: image rendered image data thumbnails a list of BufferedImage thumbnails or null metadata image metadata or null
Throws: IllegalArgumentException if image is null
Returns: image metadata or null
Returns: the number of thumbnails
Returns: the raster image data or null
Returns: the rendered image data or null
Parameters: index the index of the thumbnail to retrieve
Returns: the buffered image thumbnail
Throws: IndexOutOfBoundsException if index is out-of-bounds ClassCastException if the object returned from the thumbnails list is not a BufferedImage
Returns: a list of thumbnails or null
Returns: true if this IIOImage uses the Raster representation, false if it uses the RenderedImage representation.
Parameters: metadata the image metadata
Parameters: raster the image raster data
Throws: IllegalArgumentException if raster is null
Parameters: image the rendered image data
Throws: IllegalArgumentException if image is null
Parameters: thumbnails a new list of thumbnails or null