ar.com.hjg.pngj.lossy
Class ErrorDifussionFloydSteinberg

java.lang.Object
  extended by ar.com.hjg.pngj.lossy.ErrorDifussionFloydSteinberg
All Implemented Interfaces:
IErrorDifussion

public class ErrorDifussionFloydSteinberg
extends Object
implements IErrorDifussion

EXPERIMENTAL


Constructor Summary
ErrorDifussionFloydSteinberg(ImageInfo imginfo, boolean useLuminance)
           
 
Method Summary
 void addErr(int row, int col, int channel, int err)
          you must respect the order!
 int getTotalErr(int row, int col, int channel)
           
 boolean isLeftToright()
           
 void reset()
           
 void setLeftToright(boolean leftToright)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorDifussionFloydSteinberg

public ErrorDifussionFloydSteinberg(ImageInfo imginfo,
                                    boolean useLuminance)
Method Detail

addErr

public void addErr(int row,
                   int col,
                   int channel,
                   int err)
you must respect the order! leftoright or righttoleft err = exact - writen warning: here (and in the methods) 'col' is measure not in pixels but in samples ! = cols x channels x bytespsample

Specified by:
addErr in interface IErrorDifussion

getTotalErr

public int getTotalErr(int row,
                       int col,
                       int channel)
Specified by:
getTotalErr in interface IErrorDifussion

isLeftToright

public boolean isLeftToright()
Specified by:
isLeftToright in interface IErrorDifussion

reset

public void reset()
Specified by:
reset in interface IErrorDifussion

setLeftToright

public void setLeftToright(boolean leftToright)
Specified by:
setLeftToright in interface IErrorDifussion