uk.co.silentsoftware.core.converters.image.errordiffusionstrategy
Class JarvisJudiceNinkeDitherStrategy

java.lang.Object
  extended by uk.co.silentsoftware.core.converters.image.errordiffusionstrategy.AbstractErrorDiffusionDitherStrategy
      extended by uk.co.silentsoftware.core.converters.image.errordiffusionstrategy.JarvisJudiceNinkeDitherStrategy
All Implemented Interfaces:
ErrorDiffusionDitherStrategy

public class JarvisJudiceNinkeDitherStrategy
extends AbstractErrorDiffusionDitherStrategy
implements ErrorDiffusionDitherStrategy

Implementation of the Jarvis-Judice-Ninke error diffusion algorithm


Field Summary
private static float FIVE_FOURTY_EIGHTHS
           
private static float FOURTYEIGHTH
           
private static float SEVEN_FOURTY_EIGHTHS
           
private static float SIXTEENTH
           
 
Constructor Summary
JarvisJudiceNinkeDitherStrategy()
           
 
Method Summary
 void distributeError(java.awt.image.BufferedImage output, int oldPixel, int newPixel, int x, int y)
          Distributes the error on the output image at the given x,y, using the difference between the original (old) pixel and the new pixel.
 java.lang.String toString()
           
 
Methods inherited from class uk.co.silentsoftware.core.converters.image.errordiffusionstrategy.AbstractErrorDiffusionDitherStrategy
calculateAdjustedRGB, isInBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIXTEENTH

private static final float SIXTEENTH
See Also:
Constant Field Values

FOURTYEIGHTH

private static final float FOURTYEIGHTH
See Also:
Constant Field Values

FIVE_FOURTY_EIGHTHS

private static final float FIVE_FOURTY_EIGHTHS
See Also:
Constant Field Values

SEVEN_FOURTY_EIGHTHS

private static final float SEVEN_FOURTY_EIGHTHS
See Also:
Constant Field Values
Constructor Detail

JarvisJudiceNinkeDitherStrategy

public JarvisJudiceNinkeDitherStrategy()
Method Detail

distributeError

public void distributeError(java.awt.image.BufferedImage output,
                            int oldPixel,
                            int newPixel,
                            int x,
                            int y)
Description copied from interface: ErrorDiffusionDitherStrategy
Distributes the error on the output image at the given x,y, using the difference between the original (old) pixel and the new pixel.

Specified by:
distributeError in interface ErrorDiffusionDitherStrategy

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object