com.mizar.commons.awt
Class ImageUtils

java.lang.Object
  extended by com.mizar.commons.awt.ImageUtils

public class ImageUtils
extends java.lang.Object


Constructor Summary
protected ImageUtils()
           
 
Method Summary
static java.awt.image.BufferedImage from(byte[] bytes)
          Convert a byte array (containing an image) to a BufferedImage
static java.lang.String getContentType(byte[] image)
           
static int[] getWidthHeight(byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUtils

protected ImageUtils()
Method Detail

from

public static java.awt.image.BufferedImage from(byte[] bytes)
Convert a byte array (containing an image) to a BufferedImage

Parameters:
bytes - an array containing a valid image
Returns:

getWidthHeight

public static int[] getWidthHeight(byte[] bytes)
Parameters:
bytes - an array containing a valid image
Returns:
the width and height of the image in pixels

getContentType

public static java.lang.String getContentType(byte[] image)