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.
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)
| Modifier and Type | Field and Description |
|---|---|
| protected RenderedImage | image
The |
| protected IIOMetadata | metadata
An |
| protected Raster | raster
The |
| protected List | thumbnails
A |
| Access | Constructor and Description |
|---|---|
| public | IIOImage(RenderedImage
a image, List<? extends BufferedImage> RenderedImage.a thumbnails, IIOMetadata List of BufferedImages,
or null.an metadata)IIOMetadata object, or
null.Constructs an |
| public | IIOImage(Raster
a raster, List<? extends BufferedImage> Raster.a thumbnails, IIOMetadata List of BufferedImages,
or null.an metadata)IIOMetadata object, or
null.Constructs an |
| Modifier and Type | Method and Description |
|---|---|
| public IIOMetadata | Returns: anIIOMetadata object, or null.Returns a reference to the current |
| public int | Returns: the number of thumbnails, as anint.Returns the number of thumbnails stored in this
|
| public Raster | Returns: aRaster, or null.Returns the currently set |
| public RenderedImage | Returns: aRenderedImage, or null.Returns the currently set |
| public BufferedImage | Returns: a thumbnail image, as aBufferedImage.the index of the desired thumbnail image. index)Returns a thumbnail associated with the main image. |
| public List | Returns: the currentList of
BufferedImage thumbnails, or null.Returns the current |
| public boolean | Returns: true if a Raster is
available.Returns |
| public void | setMetadata(IIOMetadata
an metadata)IIOMetadata object, or
null.Sets the |
| public void | |
| public void | |
| public void | setThumbnails(List<? extends BufferedImage>
a thumbnails)List of
BufferedImage thumbnails, or null.Sets the list of thumbnails to a new |
| image | back to summary |
|---|---|
| protected RenderedImage image The | |
| metadata | back to summary |
|---|---|
| protected IIOMetadata metadata An | |
| raster | back to summary |
|---|---|
| protected Raster raster The | |
| thumbnails | back to summary |
|---|---|
| protected List<? extends BufferedImage> thumbnails A | |
| IIOImage | back to summary |
|---|---|
| public IIOImage(RenderedImage image, List<? extends BufferedImage> thumbnails, IIOMetadata metadata) Constructs an All parameters are stored by reference. The
| |
| IIOImage | back to summary |
|---|---|
| public IIOImage(Raster raster, List<? extends BufferedImage> thumbnails, IIOMetadata metadata) Constructs an All parameters are stored by reference.
| |
| getMetadata | back to summary |
|---|---|
| public IIOMetadata getMetadata() Returns a reference to the current
| |
| getNumThumbnails | back to summary |
|---|---|
| public int getNumThumbnails() Returns the number of thumbnails stored in this
| |
| getRaster | back to summary |
|---|---|
| public Raster getRaster() Returns the currently set | |
| getRenderedImage | back to summary |
|---|---|
| public RenderedImage getRenderedImage() Returns the currently set
| |
| getThumbnail | back to summary |
|---|---|
| public BufferedImage getThumbnail(int index) Returns a thumbnail associated with the main image.
| |
| getThumbnails | back to summary |
|---|---|
| public List Returns the current
| |
| hasRaster | back to summary |
|---|---|
| public boolean hasRaster() Returns
| |
| setMetadata | back to summary |
|---|---|
| public void setMetadata(IIOMetadata metadata) Sets the
| |
| setRaster | back to summary |
|---|---|
| public void setRaster(Raster raster) Sets the current
| |
| setRenderedImage | back to summary |
|---|---|
| public void setRenderedImage(RenderedImage image) Sets the current
| |
| setThumbnails | back to summary |
|---|---|
| public void setThumbnails(List<? extends BufferedImage> thumbnails) Sets the list of thumbnails to a new The
| |