javax.imageio

Class IIOImage

    • Field Detail

      • image

        protected RenderedImage image
        The RenderedImage being referenced.
      • raster

        protected Raster raster
        The Raster being referenced.
      • thumbnails

        protected List<? extends BufferedImage> thumbnails
        A List of BufferedImage thumbnails, or null. Non-BufferedImage objects must not be stored in this List.
      • metadata

        protected IIOMetadata metadata
        An IIOMetadata object containing metadata associated with the image.
    • Constructor Detail

      • IIOImage

        public IIOImage(RenderedImage image,
                List<? extends BufferedImage> thumbnails,
                IIOMetadata metadata)
        Constructs an IIOImage containing a RenderedImage, and thumbnails and metadata associated with it.

        All parameters are stored by reference.

        The thumbnails argument must either be null or contain only BufferedImage objects.

        Parameters:
        image - a RenderedImage.
        thumbnails - a List of BufferedImages, or null.
        metadata - an IIOMetadata object, or null.
        Throws:
        IllegalArgumentException - if image is null.
      • IIOImage

        public IIOImage(Raster raster,
                List<? extends BufferedImage> thumbnails,
                IIOMetadata metadata)
        Constructs an IIOImage containing a Raster, and thumbnails and metadata associated with it.

        All parameters are stored by reference.

        Parameters:
        raster - a Raster.
        thumbnails - a List of BufferedImages, or null.
        metadata - an IIOMetadata object, or null.
        Throws:
        IllegalArgumentException - if raster is null.
    • Method Detail

      • setRenderedImage

        public void setRenderedImage(RenderedImage image)
        Sets the current RenderedImage. The value is stored by reference. Any existing Raster is discarded.
        Parameters:
        image - a RenderedImage.
        Throws:
        IllegalArgumentException - if image is null.
        See Also:
        getRenderedImage()
      • hasRaster

        public boolean hasRaster()
        Returns true if this IIOImage stores a Raster rather than a RenderedImage.
        Returns:
        true if a Raster is available.
      • setRaster

        public void setRaster(Raster raster)
        Sets the current Raster. The value is stored by reference. Any existing RenderedImage is discarded.
        Parameters:
        raster - a Raster.
        Throws:
        IllegalArgumentException - if raster is null.
        See Also:
        getRaster()
      • getNumThumbnails

        public int getNumThumbnails()
        Returns the number of thumbnails stored in this IIOImage.
        Returns:
        the number of thumbnails, as an int.
      • setThumbnails

        public void setThumbnails(List<? extends BufferedImage> thumbnails)
        Sets the list of thumbnails to a new List of BufferedImages, or to null. The reference to the previous List is discarded.

        The thumbnails argument must either be null or contain only BufferedImage objects.

        Parameters:
        thumbnails - a List of BufferedImage thumbnails, or null.
        See Also:
        getThumbnail(int), getThumbnails()
      • setMetadata

        public void setMetadata(IIOMetadata metadata)
        Sets the IIOMetadata to a new object, or null.
        Parameters:
        metadata - an IIOMetadata object, or null.
        See Also:
        getMetadata()

Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/imageio/iioimage.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut