public class ImageUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT_BMP
Bitmap image format.
|
static String |
FORMAT_GIF
Graphics Interchange Format.
|
static String |
FORMAT_JPG
Joint Photographic Experts Group format.
|
static String |
FORMAT_PNG
Portable Network Graphic format.
|
static String |
FORMAT_WBMP
Wireless Application Protocol Bitmap image format.
|
Constructor and Description |
---|
ImageUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
toByteArray(BufferedImage image,
String format)
Convert
BufferedImage to byte array. |
public static final String FORMAT_GIF
public static final String FORMAT_PNG
public static final String FORMAT_JPG
public static final String FORMAT_BMP
public static final String FORMAT_WBMP
public ImageUtils()
public static byte[] toByteArray(BufferedImage image, String format)
BufferedImage
to byte array.image
- the image to be convertedformat
- the output image formatCopyright © 2012-2014 Bartosz Firyn (SarXos). All Rights Reserved.