railo.runtime.img
Class ImageUtil
java.lang.Object
railo.runtime.img.ImageUtil
public class ImageUtil
- extends Object
ImageUtil
public ImageUtil()
getWriterFormatNames
public static String[] getWriterFormatNames()
getReaderFormatNames
public static String[] getReaderFormatNames()
toBufferedImage
public static BufferedImage toBufferedImage(Resource res,
String format)
throws IOException
- translate a file resource to a buffered image
- Parameters:
res
-
- Returns:
-
- Throws:
IOException
toBufferedImage
public static BufferedImage toBufferedImage(byte[] bytes,
String format)
throws IOException
- translate a binary array to a buffered image
- Parameters:
binary
-
- Returns:
-
- Throws:
IOException
readBase64
public static byte[] readBase64(String b64str)
throws ExpressionException
- Throws:
ExpressionException
getFormat
public static String getFormat(Resource res)
throws IOException
- Throws:
IOException
getFormat
public static String getFormat(byte[] binary)
throws IOException
- Throws:
IOException
getFormat
public static String getFormat(byte[] binary,
String defaultValue)
getFormatFromExtension
public static String getFormatFromExtension(Resource res,
String defaultValue)
getFormatFromMimeType
public static String getFormatFromMimeType(String mt)
throws IOException
- Throws:
IOException
getFormatFromMimeType
public static String getFormatFromMimeType(String mt,
String defaultValue)
getMimeTypeFromFormat
public static String getMimeTypeFromFormat(String mt)
throws IOException
- Throws:
IOException
closeEL
public static void closeEL(ImageInputStream iis)
createBufferedImage
public static BufferedImage createBufferedImage(BufferedImage image,
int columns,
int rows)
createBufferedImage
public static BufferedImage createBufferedImage(BufferedImage image)
Copyright © 2012 Railo