public interface ImageEncoder
Modifier and Type | Method and Description |
---|---|
void |
encode(byte[] pixels,
int start,
int len)
The actual encoding implementation
|
void |
finish() |
int |
getCompressedDataLen() |
void |
initialize() |
void encode(byte[] pixels, int start, int len) throws java.lang.Exception
pixels
- array of pixels (This has nothing to do with the actual bits per pixel since it could be pixel packed)start
- offset in the pixel array where the encoding starts (the actual position could be anywhere inside the
offset byte which maybe kept track of by the implementation class through a parameter such as
currPos if the encoder is pixel oriented).len
- the number of pixels to be encoded if the encoder is pixel oriented like CCITT or the number of bytes to
be encoded if the encoder is byte oriented like LZW etc.java.lang.Exception
void finish() throws java.lang.Exception
java.lang.Exception
void initialize() throws java.lang.Exception
java.lang.Exception
int getCompressedDataLen()