com.github.sarxos.webcam.util
Class ImageUtils

java.lang.Object
  extended by com.github.sarxos.webcam.util.ImageUtils

public class ImageUtils
extends Object


Field Summary
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 Summary
ImageUtils()
           
 
Method Summary
static BufferedImage premultiple(BufferedImage src)
           
static byte[] toByteArray(BufferedImage image, String format)
          Convert BufferedImage to byte array.
static BufferedImage unpremultiple(BufferedImage pre)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_GIF

public static final String FORMAT_GIF
Graphics Interchange Format.

See Also:
Constant Field Values

FORMAT_PNG

public static final String FORMAT_PNG
Portable Network Graphic format.

See Also:
Constant Field Values

FORMAT_JPG

public static final String FORMAT_JPG
Joint Photographic Experts Group format.

See Also:
Constant Field Values

FORMAT_BMP

public static final String FORMAT_BMP
Bitmap image format.

See Also:
Constant Field Values

FORMAT_WBMP

public static final String FORMAT_WBMP
Wireless Application Protocol Bitmap image format.

See Also:
Constant Field Values
Constructor Detail

ImageUtils

public ImageUtils()
Method Detail

premultiple

public static BufferedImage premultiple(BufferedImage src)

unpremultiple

public static BufferedImage unpremultiple(BufferedImage pre)

toByteArray

public static byte[] toByteArray(BufferedImage image,
                                 String format)
Convert BufferedImage to byte array.

Parameters:
image - the image to be converted
format - the output image format
Returns:
New array of bytes


Copyright © 2012-2013 Bartosz Firyn (SarXos). All Rights Reserved.