public class ImageUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageUtils.ImageReaderUtils
A tool to handle image reader.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getFormatName(Object sourceImage)
Returns a String identifying the format of the input source.
e.g: image source is "example.png" then return "png". |
static String |
getFormatNameFromHttpImage(String sourceImageHttpURL)
Returns a String identifying the format of given web image.
e.g: image source is "example.png" then return "png". |
static ImageReader |
getImageReader(Object sourceImage)
Get image reader from given source image.
|
static ImageReader |
getImageReaderFromHttpImage(String sourceImageHttpURL)
Get image reader from given web image.
|
static byte[] |
snapshot(byte[] bytes,
Color backgroundColor) |
public static ImageReader getImageReader(Object sourceImage) throws IOException
sourceImage - the image object you want to handle.IOExceptionpublic static ImageReader getImageReaderFromHttpImage(String sourceImageHttpURL) throws IOException
sourceImageHttpURL - the web image object you want to handle.IOExceptionpublic static String getFormatName(Object sourceImage) throws IOException
sourceImage - the image which you want to handle.IOExceptionpublic static String getFormatNameFromHttpImage(String sourceImageHttpURL) throws IOException
sourceImageHttpURL - the web image url which you want to handle.IOExceptionpublic static byte[] snapshot(byte[] bytes,
Color backgroundColor)
throws IOException
IOExceptionCopyright © 2014. All rights reserved.