jjil.core
Class RgbImage

java.lang.Object
  extended by jjil.core.Image
      extended by jjil.core.RgbImage

public class RgbImage
extends Image

RgbImage is the type used to hold an RGB image, which is stored as an ARGB image type (32-bits) with the A byte always 0.

Implementation-specific libraries define methods that allow the creation of an RgbImage from a native image type. RgbImage is therefore the first and last jjil.core object used after capture and before display of an image.

Author:
webb

Constructor Summary
RgbImage(int cWidth, int cHeight)
          Creates a new instance of RgbImage
RgbImage(int cWidth, int cHeight, byte bR, byte bG, byte bB)
          Creates a new instance of RgbImage, assigning a constant value
 
Method Summary
 Image clone()
          Creates a shallow copy of this image
 int[] getData()
          Get a pointer to the image data.
 java.lang.String toString()
          Return a string describing the image.
 
Methods inherited from class jjil.core.Image
getHeight, getWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RgbImage

public RgbImage(int cWidth,
                int cHeight)
Creates a new instance of RgbImage

Parameters:
cWidth - the image width
cHeight - the image height

RgbImage

public RgbImage(int cWidth,
                int cHeight,
                byte bR,
                byte bG,
                byte bB)
Creates a new instance of RgbImage, assigning a constant value

Parameters:
bR - the red color value to be assigned.
bG - the green color value to be assigned.
bB - the blue color value to be assigned.
cWidth - the image width
cHeight - the image height
Method Detail

clone

public Image clone()
Creates a shallow copy of this image

Specified by:
clone in class Image
Returns:
the image copy.

getData

public int[] getData()
Get a pointer to the image data.

Returns:
the data pointer.

toString

public java.lang.String toString()
Return a string describing the image.

Overrides:
toString in class java.lang.Object
Returns:
the string.