Class BufferedImageSource
- java.lang.Object
-
- net.coobird.thumbnailator.tasks.io.AbstractImageSource<java.awt.image.BufferedImage>
-
- net.coobird.thumbnailator.tasks.io.BufferedImageSource
-
- All Implemented Interfaces:
ImageSource<java.awt.image.BufferedImage>
public class BufferedImageSource extends AbstractImageSource<java.awt.image.BufferedImage>
AnImageSourcewhich uses aBufferedImageas the source image.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.image.BufferedImageimgThe image that should be used as the source for making a thumbnail.-
Fields inherited from class net.coobird.thumbnailator.tasks.io.AbstractImageSource
hasReadInput, inputFormatName, param
-
-
Constructor Summary
Constructors Constructor Description BufferedImageSource(java.awt.image.BufferedImage img)Instantiates aBufferedImageSourceobject with theBufferedImagethat should be used as the source image for making thumbnails.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagegetSource()Returns the source from which the image is read or retrieved.java.awt.image.BufferedImageread()Retrieves the image from the source.-
Methods inherited from class net.coobird.thumbnailator.tasks.io.AbstractImageSource
finishedReading, getInputFormatName, setThumbnailParameter
-
-
-
-
Constructor Detail
-
BufferedImageSource
public BufferedImageSource(java.awt.image.BufferedImage img)
Instantiates aBufferedImageSourceobject with theBufferedImagethat 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.IOExceptionDescription copied from interface:ImageSourceRetrieves 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:ImageSourceReturns the source from which the image is read or retrieved.- Returns:
- The source of the image.
-
-