Package com.sun.pdfview.decode
Class PNGPredictor
- java.lang.Object
-
- com.sun.pdfview.decode.Predictor
-
- com.sun.pdfview.decode.PNGPredictor
-
public class PNGPredictor extends Predictor
Undo prediction based on the PNG algorithm.
-
-
Constructor Summary
Constructors Constructor Description PNGPredictor()
Creates a new instance of PNGPredictor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doAverageLine(byte[] curLine, byte[] prevLine)
Return the value of the average algorithm on the line (compare bytes to the average of the previous byte of the same color and the same byte on the previous line)protected void
doPaethLine(byte[] curLine, byte[] prevLine)
Return the value of the average algorithm on the line (compare bytes to the average of the previous byte of the same color and the same byte on the previous line)protected void
doSubLine(byte[] curLine)
Return the value of the Sub algorithm on the line (compare bytes to the previous byte of the same color on this line).protected void
doUpLine(byte[] curLine, byte[] prevLine)
Return the value of the up algorithm on the line (compare bytes to the same byte in the previous line)protected int
paeth(int left, int up, int upLeft)
The paeth algorithmjava.nio.ByteBuffer
unpredict(java.nio.ByteBuffer imageData)
Undo data based on the png algorithm-
Methods inherited from class com.sun.pdfview.decode.Predictor
getAlgorithm, getBitsPerComponent, getColors, getColumns, getPredictor, setBitsPerComponent, setColors, setColumns
-
-
-
-
Method Detail
-
unpredict
public java.nio.ByteBuffer unpredict(java.nio.ByteBuffer imageData) throws java.io.IOException
Undo data based on the png algorithm
-
doSubLine
protected void doSubLine(byte[] curLine)
Return the value of the Sub algorithm on the line (compare bytes to the previous byte of the same color on this line).
-
doUpLine
protected void doUpLine(byte[] curLine, byte[] prevLine)
Return the value of the up algorithm on the line (compare bytes to the same byte in the previous line)
-
doAverageLine
protected void doAverageLine(byte[] curLine, byte[] prevLine)
Return the value of the average algorithm on the line (compare bytes to the average of the previous byte of the same color and the same byte on the previous line)
-
doPaethLine
protected void doPaethLine(byte[] curLine, byte[] prevLine)
Return the value of the average algorithm on the line (compare bytes to the average of the previous byte of the same color and the same byte on the previous line)
-
paeth
protected int paeth(int left, int up, int upLeft)
The paeth algorithm
-
-