Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
net.sourceforge.jiu.data.MemoryBilevelImage
BilevelImage
interface that stores image
data in a byte
array in memory.
An image of width
times height
pixels will require
(width + 7) / 8 * height
bytes of memory.
Field Summary | |
private int | |
private int | |
private int | |
private byte[] |
Fields inherited from interface net.sourceforge.jiu.data.BilevelImage | |
BLACK , WHITE |
Constructor Summary | |
|
Method Summary | |
private void |
|
private void |
|
private void |
|
void |
|
void |
|
PixelImage |
|
PixelImage | |
long | |
int | |
int | |
Class | |
int |
|
int | |
void |
|
int |
|
int |
|
void |
|
int |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
private final int BYTES_PER_ROW
private final int HEIGHT
private final int WIDTH
private final byte[] data
public MemoryBilevelImage(int width, int height)
Create a new MemoryBilevelImage object with the specified resolution.
- Parameters:
width
- the horizontal resolution of the new image, must be larger than zeroheight
- the vertical resolution of the new image, must be larger than zero
private void checkBitOffset(int bitOffset)
private void checkPositionAndNumber(int x, int y, int w, int h)
private void checkValue(int value)
public PixelImage createCompatibleImage(int width, int height)
- Specified by:
- createCompatibleImage in interface PixelImage
public long getAllocatedMemory()
- Specified by:
- getAllocatedMemory in interface PixelImage
public int getMaxSample(int channelIndex)
- Specified by:
- getMaxSample in interface IntegerImage
public void getPackedBytes(int x, int y, int numSamples, byte[] dest, int destOffset, int destBitOffset)
- Specified by:
- getPackedBytes in interface BilevelImage
public int getSample(int channelIndex, int x, int y)
- Specified by:
- getSample in interface IntegerImage
public void getSamples(int channelIndex, int x, int y, int w, int h, int[] dest, int destOffset)
- Specified by:
- getSamples in interface IntegerImage
public void putPackedBytes(int x, int y, int numSamples, byte[] src, int srcOffset, int srcBitOffset)
- Specified by:
- putPackedBytes in interface BilevelImage
public void putSample(int x, int y, int newValue)
- Specified by:
- putSample in interface IntegerImage
public void putSample(int channelIndex, int x, int y, int newValue)
- Specified by:
- putSample in interface IntegerImage
public void putSamples(int channelIndex, int x, int y, int w, int h, int[] src, int srcOffset)
- Specified by:
- putSamples in interface IntegerImage