jjil.core
Class Gray8Image

java.lang.Object
  extended by jjil.core.Image
      extended by jjil.core.Gray8Image
Direct Known Subclasses:
Gray8MaskedImage, Gray8SubImage

public class Gray8Image
extends Image

Gray8Image is the image type used to store a signed 8-bit image. Note that Java limitations (no unsigned byte) make it necessary to treat alll 8-bit images as signed.

Author:
webb

Constructor Summary
Gray8Image(int cWidth, int cHeight)
          Creates a new instance of Gray8Image
Gray8Image(int cWidth, int cHeight, byte bValue)
          Creates a new instance of Gray8Image
 
Method Summary
 Image clone()
          Copy this image
 byte[] getData()
          Return 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

Gray8Image

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

Parameters:
cWidth - Width of the image (columns).
cHeight - Height of the image (rows)

Gray8Image

public Gray8Image(int cWidth,
                  int cHeight,
                  byte bValue)
Creates a new instance of Gray8Image

Parameters:
cWidth - Width of the image (columns).
cHeight - Height of the image (rows)
bValue - constant value to be assigned to the image
Method Detail

clone

public Image clone()
Copy this image

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

getData

public byte[] getData()
Return 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.