Package com.sksamuel.scrimage.nio
Class ImageReaders
- java.lang.Object
-
- com.sksamuel.scrimage.nio.ImageReaders
-
public class ImageReaders extends java.lang.Object
Utilities for reading of an Image to an array of bytes in a specified format.
-
-
Constructor Summary
Constructors Constructor Description ImageReaders()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImmutableImage
read(ImageSource source, java.awt.Rectangle rectangle)
static ImmutableImage
read(ImageSource source, java.awt.Rectangle rectangle, java.lang.ClassLoader classloader)
static ImmutableImage
read(ImageSource source, java.awt.Rectangle rectangle, java.util.List<ImageReader> readers)
Attempts to read an image from the given source, using the supplied image readers.
-
-
-
Method Detail
-
read
public static ImmutableImage read(ImageSource source, java.awt.Rectangle rectangle) throws java.io.IOException
- Throws:
java.io.IOException
-
read
public static ImmutableImage read(ImageSource source, java.awt.Rectangle rectangle, java.lang.ClassLoader classloader) throws java.io.IOException
- Throws:
java.io.IOException
-
read
public static ImmutableImage read(ImageSource source, java.awt.Rectangle rectangle, java.util.List<ImageReader> readers) throws java.io.IOException
Attempts to read an image from the given source, using the supplied image readers.- Parameters:
source
- the image sourcerectangle
- an optional subset of the image to read.readers
- the readers that should be used to attempt to load this image.- Throws:
java.io.IOException
-
-