Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.graphics.predictor » [javadoc | source]
org.apache.pdfbox.pdmodel.graphics.predictor
public class: Paeth [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm
      org.apache.pdfbox.pdmodel.graphics.predictor.Paeth
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))
Method from org.apache.pdfbox.pdmodel.graphics.predictor.Paeth Summary:
decodeLine,   encodeLine,   paethPredictor
Methods from org.apache.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm:
aboveLeftPixel,   abovePixel,   checkBufsiz,   decode,   decodeLine,   encode,   encodeLine,   getBpp,   getFilter,   getHeight,   getWidth,   leftPixel,   main,   setBpp,   setHeight,   setWidth
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.graphics.predictor.Paeth Detail:
 public  void decodeLine(byte[] src,
    byte[] dest,
    int srcDy,
    int srcOffset,
    int destDy,
    int destOffset) 
    {@inheritDoc}
 public  void encodeLine(byte[] src,
    byte[] dest,
    int srcDy,
    int srcOffset,
    int destDy,
    int destOffset) 
    {@inheritDoc}
 public int paethPredictor(int a,
    int b,
    int c) 
    The paeth predictor function. This function is taken almost directly from the PNG definition on http://www.w3.org/TR/PNG-Filters.html