Constructor and Description |
---|
ImageUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
closeEL(ImageInputStream iis) |
static BufferedImage |
createBufferedImage(BufferedImage image) |
static BufferedImage |
createBufferedImage(BufferedImage image,
int columns,
int rows) |
static String |
getFormat(byte[] binary) |
static String |
getFormat(byte[] binary,
String defaultValue) |
static String |
getFormat(Resource res) |
static String |
getFormatFromExtension(Resource res,
String defaultValue) |
static String |
getFormatFromMimeType(String mt) |
static String |
getFormatFromMimeType(String mt,
String defaultValue) |
static String |
getMimeTypeFromFormat(String mt) |
static String[] |
getReaderFormatNames() |
static String[] |
getWriterFormatNames() |
static byte[] |
readBase64(String b64str,
StringBuilder mimetype) |
static BufferedImage |
toBufferedImage(byte[] bytes,
String format)
translate a binary array to a buffered image
|
static BufferedImage |
toBufferedImage(Resource res,
String format)
translate a file resource to a buffered image
|
public ImageUtil()
public static String[] getWriterFormatNames()
public static String[] getReaderFormatNames()
public static BufferedImage toBufferedImage(Resource res, String format) throws IOException
res
- IOException
public static BufferedImage toBufferedImage(byte[] bytes, String format) throws IOException
binary
- IOException
public static byte[] readBase64(String b64str, StringBuilder mimetype) throws IOException
IOException
public static String getFormat(Resource res) throws IOException
IOException
public static String getFormat(byte[] binary) throws IOException
IOException
public static String getFormatFromExtension(Resource res, String defaultValue)
public static String getFormatFromMimeType(String mt) throws IOException
IOException
public static String getFormatFromMimeType(String mt, String defaultValue)
public static String getMimeTypeFromFormat(String mt) throws IOException
IOException
public static void closeEL(ImageInputStream iis)
public static BufferedImage createBufferedImage(BufferedImage image, int columns, int rows)
public static BufferedImage createBufferedImage(BufferedImage image)
Copyright © 2015 Lucee