|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.layer.GreyImage
public class GreyImage
A greyscale image backed by a a byte buffer. The buffer is initially set to zero values, corresponding to white. Black corresponds to byte values of 255. Trial and error suggests that it is more efficient in time, though not in memory, to use greyscale than bitmap images (BufferedImage.TYPE_BYTE_BINARY), even if only bitmap type values are required.
GraphicsBitmap
,
RgbImage
Method Summary | |
---|---|
static GreyImage |
createGreyImage(int width,
int height)
Factory method to create an instance. |
Pixer |
createPixer()
Returns a pixel iterator that iterates over all the pixels that have been altered (are non-white) in this image. |
byte[] |
getBuffer()
Returns the byte array backing the image. |
BufferedImage |
getImage()
Returns the greyscale image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public BufferedImage getImage()
public byte[] getBuffer()
public Pixer createPixer()
public static GreyImage createGreyImage(int width, int height)
width
- image width in pixelsheight
- image height in pixels
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |