ar.com.hjg.pngj.lossy
Class ErrorDifussionTrivial

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

public class ErrorDifussionTrivial
extends Object
implements IErrorDifussion


Constructor Summary
ErrorDifussionTrivial(ImageInfo imginfo)
          warning: here (and in the methods) 'col' is measure not in pixels but in samples !
 
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

ErrorDifussionTrivial

public ErrorDifussionTrivial(ImageInfo imginfo)
warning: here (and in the methods) 'col' is measure not in pixels but in samples ! = cols x channels x bytespsample

Method Detail

addErr

public void addErr(int row,
                   int col,
                   int channel,
                   int err)
Description copied from interface: IErrorDifussion
you must respect the order! leftoright or righttoleft err = exact - writen warning: here (and in the methods)

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