uk.co.silentsoftware.core.converters.image.orderedditherstrategy
Class AbstractOrderedDitherStrategy

java.lang.Object
  extended by uk.co.silentsoftware.core.converters.image.orderedditherstrategy.AbstractOrderedDitherStrategy
Direct Known Subclasses:
BayerEightByEightDitherStrategy, BayerFourByFourDitherStrategy, BayerTwoByOneOrderedDitherStrategy, BayerTwoByTwoOrderedDitherStrategy, LightnessOrderedDitherStrategy, MagicSquareDitherStrategy, NasikMagicSquareDitherStrategy, OmegaOrderedDitherStrategy

public abstract class AbstractOrderedDitherStrategy
extends java.lang.Object

Base class for applying an ordered dither strategy


Constructor Summary
AbstractOrderedDitherStrategy()
           
 
Method Summary
 int[] applyDither(int[] outRgb)
          Applies the sub class' dither coefficients to the given rgb matrix from an image
abstract  int[] getCoefficients()
          Retrieves the coefficients to apply
abstract  int getMatrixHeight()
          Retrieves the height of the matrix (1 dimension only)
abstract  int getMatrixWidth()
          Retrieves the width of the matrix (1 dimension only)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOrderedDitherStrategy

public AbstractOrderedDitherStrategy()
Method Detail

applyDither

public int[] applyDither(int[] outRgb)
Applies the sub class' dither coefficients to the given rgb matrix from an image

Parameters:
outRgb -
Returns:

getCoefficients

public abstract int[] getCoefficients()
Retrieves the coefficients to apply

Returns:

getMatrixWidth

public abstract int getMatrixWidth()
Retrieves the width of the matrix (1 dimension only)

Returns:

getMatrixHeight

public abstract int getMatrixHeight()
Retrieves the height of the matrix (1 dimension only)

Returns: