com.github.sarxos.webcam.util
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 BufferedImage |
premultiple(BufferedImage src) |
static byte[] |
toByteArray(BufferedImage image,
String format)
Convert
BufferedImage to byte array. |
static byte[] |
toRawByteArray(BufferedImage image) |
static BufferedImage |
unpremultiple(BufferedImage pre) |
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 BufferedImage premultiple(BufferedImage src)
public static BufferedImage unpremultiple(BufferedImage pre)
public static byte[] toByteArray(BufferedImage image, String format)
BufferedImage
to byte array.image
- the image to be convertedformat
- the output image formatpublic static byte[] toRawByteArray(BufferedImage image)
Copyright © 2012-2013 Bartosz Firyn (SarXos). All Rights Reserved.