Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.graphics.predictor » [javadoc | source]
org.apache.pdfbox.pdmodel.graphics.predictor
abstract public class: PredictorAlgorithm [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm

Direct Known Subclasses:
    None, Average, Sub, Up, Paeth, Optimum

Implements different PNG predictor algorithms that is used in PDF files.
Method from org.apache.pdfbox.pdmodel.graphics.predictor.PredictorAlgorithm Summary:
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.PredictorAlgorithm Detail:
 public int aboveLeftPixel(byte[] buf,
    int offset,
    int dy,
    int x) 
    Get the above-left pixel from the buffer.
 public int abovePixel(byte[] buf,
    int offset,
    int dy,
    int x) 
    Get the above pixel from the buffer.
 public  void checkBufsiz(byte[] src,
    byte[] dest) 
    check that buffer sizes matches width,height,bpp. This implementation is used by most of the filters, but not Uptimum.
 public  void decode(byte[] src,
    byte[] dest) 
    decode a byte array full of image data using the filter that this object implements.
 abstract 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.
 public  void encode(byte[] src,
    byte[] dest) 
    encode a byte array full of image data using the filter that this object implements.
 abstract 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.
 public int getBpp() 
 public static PredictorAlgorithm getFilter(int predictor) 
 public int getHeight() 
 public int getWidth() 
 public int leftPixel(byte[] buf,
    int offset,
    int dy,
    int x) 
    Get the left pixel from the buffer.
 public static  void main(String[] args) 
    Simple command line program to test the algorithm.
 public  void setBpp(int newBpp) 
 public  void setHeight(int newHeight) 
 public  void setWidth(int newWidth)