org.apache.pdfbox.pdmodel.graphics.predictor
Class Sub
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm
org.apache.pdfbox.pdmodel.graphics.predictor.Sub
public class Sub
- extends PredictorAlgorithm
The sub algorithm.
Sub(i,j) = Raw(i,j) - Raw(i-1,j)
Raw(i,j) = Sub(i,j) + Raw(i-1,j)
- Version:
- $Revision: 1.3 $
- Author:
- [email protected]
Constructor Summary |
Sub()
|
Method Summary |
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 |
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. |
Methods inherited from class org.apache.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm |
aboveLeftPixel, abovePixel, checkBufsiz, decode, encode, getBpp, getFilter, getHeight, getWidth, leftPixel, main, setBpp, setHeight, setWidth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sub
public Sub()
encodeLine
public 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.
- Specified by:
encodeLine
in class PredictorAlgorithm
- Parameters:
src
- raw image datadest
- encoded datasrcDy
- byte offset between linessrcOffset
- beginning of line datadestDy
- byte offset between linesdestOffset
- beginning of line data
decodeLine
public 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.
- Specified by:
decodeLine
in class PredictorAlgorithm
- Parameters:
src
- encoded image datadest
- raw datasrcDy
- byte offset between linessrcOffset
- beginning of line datadestDy
- byte offset between linesdestOffset
- beginning of line data
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.