uk.co.silentsoftware.core.converters.image.errordiffusionstrategy
Class FloydSteinbergDitherStrategy
java.lang.Object
uk.co.silentsoftware.core.converters.image.errordiffusionstrategy.AbstractErrorDiffusionDitherStrategy
uk.co.silentsoftware.core.converters.image.errordiffusionstrategy.FloydSteinbergDitherStrategy
- All Implemented Interfaces:
- ErrorDiffusionDitherStrategy
public class FloydSteinbergDitherStrategy
- extends AbstractErrorDiffusionDitherStrategy
- implements ErrorDiffusionDitherStrategy
Implementation of the Floyd-Steinberg error diffusion algorithm
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SIXTEENTH
public static final float SIXTEENTH
- See Also:
- Constant Field Values
THREE_SIXTEENTHS
public static final float THREE_SIXTEENTHS
- See Also:
- Constant Field Values
FIVE_SIXTEENTHS
public static final float FIVE_SIXTEENTHS
- See Also:
- Constant Field Values
SEVEN_SIXTEENTHS
public static final float SEVEN_SIXTEENTHS
- See Also:
- Constant Field Values
FloydSteinbergDitherStrategy
public FloydSteinbergDitherStrategy()
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