railo.runtime.img.filter
Class KeyFilter

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

public class KeyFilter
extends AbstractBufferedImageOp
implements DynFiltering

An experimental filter which can be used for keying against a clean shot. Given a source image, a clean image and a destination image, the filter replaces all pixels in the source which nearly equal the equivalent clean pixel by destination pixels.


Constructor Summary
KeyFilter()
           
 
Method Summary
 BufferedImage filter(BufferedImage src, BufferedImage dst)
           
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 float getBTolerance()
          Get the brightness tolerance.
 BufferedImage getCleanImage()
          Get the clean image.
 BufferedImage getDestination()
          Get the destination image.
 float getHTolerance()
          Get the hue tolerance.
 float getSTolerance()
          Get the saturation tolerance.
 void setBTolerance(float bTolerance)
          Set the brightness tolerance of the image in the range 0..1.
 void setCleanImage(BufferedImage cleanImage)
          Get the clean image.
 void setDestination(BufferedImage destination)
          Set the destination image.
 void setHTolerance(float hTolerance)
          Set the hue tolerance of the image in the range 0..1.
 void setSTolerance(float sTolerance)
          Set the saturation tolerance of the image in the range 0..1.
 String toString()
           
 
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
 

Constructor Detail

KeyFilter

public KeyFilter()
Method Detail

setHTolerance

public void setHTolerance(float hTolerance)
Set the hue tolerance of the image in the range 0..1.

Parameters:
hTolerance - the tolerance
See Also:
getHTolerance()

getHTolerance

public float getHTolerance()
Get the hue tolerance.

Returns:
the tolerance
See Also:
setHTolerance(float)

setSTolerance

public void setSTolerance(float sTolerance)
Set the saturation tolerance of the image in the range 0..1.

Parameters:
sTolerance - the tolerance
See Also:
getSTolerance()

getSTolerance

public float getSTolerance()
Get the saturation tolerance.

Returns:
the tolerance
See Also:
setSTolerance(float)

setBTolerance

public void setBTolerance(float bTolerance)
Set the brightness tolerance of the image in the range 0..1.

Parameters:
bTolerance - the tolerance
See Also:
getBTolerance()

getBTolerance

public float getBTolerance()
Get the brightness tolerance.

Returns:
the tolerance
See Also:
setBTolerance(float)

setDestination

public void setDestination(BufferedImage destination)
Set the destination image.

Parameters:
destination - the destination image
See Also:
getDestination()

getDestination

public BufferedImage getDestination()
Get the destination image.

Returns:
the destination image
See Also:
setDestination(java.awt.image.BufferedImage)

setCleanImage

public void setCleanImage(BufferedImage cleanImage)
Get the clean image.

Parameters:
cleanImage - the clean image
See Also:
getCleanImage()

getCleanImage

public BufferedImage getCleanImage()
Get the clean image.

Returns:
the clean image
See Also:
setCleanImage(java.awt.image.BufferedImage)

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Specified by:
filter in interface BufferedImageOp

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
Throws:
PageException


Copyright © 2012 Railo