railo.runtime.img.filter
Class DitherFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.PointFilter
          extended by railo.runtime.img.filter.DitherFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering

public class DitherFilter
extends PointFilter
implements DynFiltering

A filter which performs ordered dithering on an image.


Field Summary
static int[] dither90Halftone6x6Matrix
          6x6 90 degree halftone.
static int[] ditherCluster3Matrix
          Order-3 clustered dither.
static int[] ditherCluster4Matrix
          Order-4 clustered dither.
static int[] ditherCluster8Matrix
          Order-8 clustered dither.
static int[] ditherLines4x4Matrix
          4x4 lines.
static int[] ditherOrdered4x4Matrix
          4x4 ordered dither.
static int[] ditherOrdered6x6Matrix
          Order-6 ordered dither.
static int[] ditherOrdered8x8Matrix
          Order-8 ordered dither.
 
Constructor Summary
DitherFilter()
          Constuct a DitherFilter.
 
Method Summary
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 int filterRGB(int x, int y, int rgb)
           
 boolean getColorDither()
          Get whether to use a color dither.
 int getLevels()
          Get the number of dither levels.
 int[] getMatrix()
          Get the dither matrix.
 void setColorDither(boolean colorDither)
          Set whether to use a color dither.
 void setLevels(int levels)
          Set the number of dither levels.
 void setMatrix(int[] matrix)
          Set the dither matrix.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.PointFilter
filter, setDimensions
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ditherOrdered4x4Matrix

public static final int[] ditherOrdered4x4Matrix
4x4 ordered dither.


ditherLines4x4Matrix

public static final int[] ditherLines4x4Matrix
4x4 lines.


dither90Halftone6x6Matrix

public static final int[] dither90Halftone6x6Matrix
6x6 90 degree halftone.


ditherOrdered6x6Matrix

public static final int[] ditherOrdered6x6Matrix
Order-6 ordered dither.


ditherOrdered8x8Matrix

public static final int[] ditherOrdered8x8Matrix
Order-8 ordered dither.


ditherCluster3Matrix

public static final int[] ditherCluster3Matrix
Order-3 clustered dither.


ditherCluster4Matrix

public static final int[] ditherCluster4Matrix
Order-4 clustered dither.


ditherCluster8Matrix

public static final int[] ditherCluster8Matrix
Order-8 clustered dither.

Constructor Detail

DitherFilter

public DitherFilter()
Constuct a DitherFilter.

Method Detail

setMatrix

public void setMatrix(int[] matrix)
Set the dither matrix.

Parameters:
matrix - the dither matrix
See Also:
getMatrix()

getMatrix

public int[] getMatrix()
Get the dither matrix.

Returns:
the dither matrix
See Also:
setMatrix(int[])

setLevels

public void setLevels(int levels)
Set the number of dither levels.

Parameters:
levels - the number of levels
See Also:
getLevels()

getLevels

public int getLevels()
Get the number of dither levels.

Returns:
the number of levels
See Also:
setLevels(int)

setColorDither

public void setColorDither(boolean colorDither)
Set whether to use a color dither.

Parameters:
colorDither - whether to use a color dither
See Also:
getColorDither()

getColorDither

public boolean getColorDither()
Get whether to use a color dither.

Returns:
whether to use a color dither
See Also:
getColorDither()

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Specified by:
filterRGB in class PointFilter

toString

public String toString()
Overrides:
toString in class Object

filter

public BufferedImage filter(BufferedImage src,
                            Struct parameters)
                     throws PageException
Specified by:
filter in interface DynFiltering
Overrides:
filter in class PointFilter
Throws:
PageException


Copyright © 2012 Railo