Class BufferedImageSource

  • All Implemented Interfaces:
    ImageSource<java.awt.image.BufferedImage>

    public class BufferedImageSource
    extends AbstractImageSource<java.awt.image.BufferedImage>
    An ImageSource which uses a BufferedImage as the source image.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.awt.image.BufferedImage img
      The image that should be used as the source for making a thumbnail.
    • Constructor Summary

      Constructors 
      Constructor Description
      BufferedImageSource​(java.awt.image.BufferedImage img)
      Instantiates a BufferedImageSource object with the BufferedImage that should be used as the source image for making thumbnails.
    • Field Detail

      • img

        private final java.awt.image.BufferedImage img
        The image that should be used as the source for making a thumbnail.
    • Constructor Detail

      • BufferedImageSource

        public BufferedImageSource​(java.awt.image.BufferedImage img)
        Instantiates a BufferedImageSource object with the BufferedImage that should be used as the source image for making thumbnails.
        Parameters:
        img - The source image.
        Throws:
        java.lang.NullPointerException - If the image is null.
    • Method Detail

      • read

        public java.awt.image.BufferedImage read()
                                          throws java.io.IOException
        Description copied from interface: ImageSource
        Retrieves the image from the source.
        Returns:
        The image.
        Throws:
        java.io.IOException - When a problem occurs while reading or obtaining the image.
      • getSource

        public java.awt.image.BufferedImage getSource()
        Description copied from interface: ImageSource
        Returns the source from which the image is read or retrieved.
        Returns:
        The source of the image.