| Constructor and Description |
|---|
PredictorAlgorithm() |
| Modifier and Type | Method and Description |
|---|---|
int |
aboveLeftPixel(byte[] buf,
int offset,
int dy,
int x)
Get the above-left pixel from the buffer.
|
int |
abovePixel(byte[] buf,
int offset,
int dy,
int x)
Get the above pixel from the buffer.
|
void |
checkBufsiz(byte[] src,
byte[] dest)
check that buffer sizes matches width,height,bpp.
|
void |
decode(byte[] src,
byte[] dest)
decode a byte array full of image data using the filter that this object
implements.
|
abstract void |
decodeLine(byte[] src,
byte[] dest,
int srcDy,
int srcOffset,
int destDy,
int destOffset)
decode line of pixel data in src from src_offset and width*bpp bytes
forward, put the decoded bytes into dest.
|
void |
encode(byte[] src,
byte[] dest)
encode a byte array full of image data using the filter that this object
implements.
|
abstract void |
encodeLine(byte[] src,
byte[] dest,
int srcDy,
int srcOffset,
int destDy,
int destOffset)
encode line of pixel data in src from srcOffset and width*bpp bytes
forward, put the decoded bytes into dest.
|
int |
getBpp() |
static PredictorAlgorithm |
getFilter(int predictor) |
int |
getHeight() |
int |
getWidth() |
int |
leftPixel(byte[] buf,
int offset,
int dy,
int x)
Get the left pixel from the buffer.
|
static void |
main(String[] args)
Simple command line program to test the algorithm.
|
void |
setBpp(int newBpp) |
void |
setHeight(int newHeight) |
void |
setWidth(int newWidth) |
public void checkBufsiz(byte[] src,
byte[] dest)
src - The source buffer.dest - The destination buffer.public abstract void encodeLine(byte[] src,
byte[] dest,
int srcDy,
int srcOffset,
int destDy,
int destOffset)
src - raw image datadest - encoded datasrcDy - byte offset between linessrcOffset - beginning of line datadestDy - byte offset between linesdestOffset - beginning of line datapublic abstract void decodeLine(byte[] src,
byte[] dest,
int srcDy,
int srcOffset,
int destDy,
int destOffset)
src - encoded image datadest - raw datasrcDy - byte offset between linessrcOffset - beginning of line datadestDy - byte offset between linesdestOffset - beginning of line datapublic static void main(String[] args)
args - The command line arguments.public int leftPixel(byte[] buf,
int offset,
int dy,
int x)
buf - The buffer.offset - The offset into the buffer.dy - The dy value.x - The x value.public int abovePixel(byte[] buf,
int offset,
int dy,
int x)
buf - The buffer.offset - The offset into the buffer.dy - The dy value.x - The x value.public int aboveLeftPixel(byte[] buf,
int offset,
int dy,
int x)
buf - The buffer.offset - The offset into the buffer.dy - The dy value.x - The x value.public int getBpp()
public void setBpp(int newBpp)
newBpp - The bpp to set.public int getHeight()
public void setHeight(int newHeight)
newHeight - The height to set.public int getWidth()
public void setWidth(int newWidth)
newWidth - The width to set.public void encode(byte[] src,
byte[] dest)
src - bufferdest - bufferpublic void decode(byte[] src,
byte[] dest)
src - bufferdest - bufferpublic static PredictorAlgorithm getFilter(int predictor)
predictor - Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.