| java.lang.Object org.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm org.pdfbox.pdmodel.graphics.predictor.Paeth
Paeth | public class Paeth extends PredictorAlgorithm (Code) | | From http://www.w3.org/TR/PNG-Filters.html: The Paeth filter computes a
simple linear function of the three neighboring pixels (left, above, upper
left), then chooses as predictor the neighboring pixel closest to the
computed value. This technique is due to Alan W. Paeth [PAETH].
To compute the Paeth filter, apply the following formula to each byte of the
scanline:
Paeth(i,j) = Raw(i,j) - PaethPredictor(Raw(i-1,j), Raw(i,j-1), Raw(i-1,j-1))
To decode the Paeth filter
Raw(i,j) = Paeth(i,j) - PaethPredictor(Raw(i-1,j), Raw(i,j-1), Raw(i-1,j-1))
author: xylifyx@yahoo.co.uk version: $Revision: 1.3 $ |
Method Summary | |
public void | decodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset) | public void | encodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset) | public int | paethPredictor(int a, int b, int c) The paeth predictor function. |
decodeLine | public void decodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset)(Code) | | |
encodeLine | public void encodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset)(Code) | | |
paethPredictor | public int paethPredictor(int a, int b, int c)(Code) | | The paeth predictor function.
This function is taken almost directly from the PNG definition on
http://www.w3.org/TR/PNG-Filters.html
Parameters: a - left Parameters: b - above Parameters: c - upper left The result of the paeth predictor. |
Methods inherited from org.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm | public int aboveLeftPixel(byte[] buf, int offset, int dy, int x)(Code)(Java Doc) public int abovePixel(byte[] buf, int offset, int dy, int x)(Code)(Java Doc) public void checkBufsiz(byte[] src, byte[] dest)(Code)(Java Doc) public void decode(byte[] src, byte[] dest)(Code)(Java Doc) abstract public void decodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset)(Code)(Java Doc) public void encode(byte[] src, byte[] dest)(Code)(Java Doc) abstract public void encodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, int destDy, int destOffset)(Code)(Java Doc) public int getBpp()(Code)(Java Doc) public static PredictorAlgorithm getFilter(int predictor)(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public int leftPixel(byte[] buf, int offset, int dy, int x)(Code)(Java Doc) public static void main(String[] args)(Code)(Java Doc) public void setBpp(int newBpp)(Code)(Java Doc) public void setHeight(int newHeight)(Code)(Java Doc) public void setWidth(int newWidth)(Code)(Java Doc)
|
|
|