Module java.desktop
Package javax.imageio

Class IIOImage

java.lang.Object
javax.imageio.IIOImage

public class IIOImage
extends Object
A simple container class to aggregate an image, a set of thumbnail (preview) images, and an object representing metadata associated with the image.

The image data may take the form of either a RenderedImage, or a Raster. Reader methods that return an IIOImage will always return a BufferedImage using the RenderedImage reference. Writer methods that accept an IIOImage will always accept a RenderedImage, and may optionally accept a Raster.

Exactly one of getRenderedImage and getRaster will return a non-null value. Subclasses are responsible for ensuring this behavior.

See Also:
ImageReader.readAll(int, ImageReadParam), ImageReader.readAll(java.util.Iterator), ImageWriter.write(javax.imageio.metadata.IIOMetadata, IIOImage, ImageWriteParam), ImageWriter.write(IIOImage), ImageWriter.writeToSequence(IIOImage, ImageWriteParam), ImageWriter.writeInsert(int, IIOImage, ImageWriteParam)