PenProfile 2.x

com.livescribe.display
Class Image

java.lang.Object
  extended by com.livescribe.display.Image

public class Image
extends Object

Image represents a image buffer that can hold pixel data. It can also be a target for graphics operations.


Method Summary
static Image createImage(byte[] data)
          Creates a new image from the given ARW-encoded byte array.
static Image createImage(InputStream in)
          Creates a new image from an ARW-encoded byte stream.
static Image createImage(int width, int height)
          Create a black image with the dimensions specified.
static Image createImage(int width, int height, byte color)
          Create an image with the specified size and background color.
 int getHeight()
          Gets the image height
 int getWidth()
          Gets the image width
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createImage

public static Image createImage(byte[] data)
Creates a new image from the given ARW-encoded byte array.

Parameters:
data - the ARW-encoded image data
Returns:
a new Image instance or null if the data could not be processed as an ARW image.

createImage

public static Image createImage(int width,
                                int height)
Create a black image with the dimensions specified.

Parameters:
width - image width
height - image height
Returns:
image instance.
Throws:
IllegalArgumentException - if the width or height are ≤ zero.

createImage

public static Image createImage(int width,
                                int height,
                                byte color)
Create an image with the specified size and background color.

Parameters:
width - image width
height - image height
color - color to be used to fill the image.
Returns:
image instance.
Throws:
IllegalArgumentException - if the width or height are ≤ zero.

createImage

public static Image createImage(InputStream in)
                         throws IOException
Creates a new image from an ARW-encoded byte stream.

Parameters:
in - the input stream containing the image data
Returns:
a new image instance.
Throws:
IOException - if there was an I/O error while reading from the stream.
IllegalArgumentException - if the data is not formatted correctly as an ARW image.

getWidth

public int getWidth()
Gets the image width

Returns:
width

getHeight

public int getHeight()
Gets the image height

Returns:
height

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.