railo.runtime.img.filter
Class MapColorsFilter

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

public class MapColorsFilter
extends PointFilter
implements DynFiltering

A filter which replaces one color by another in an image. This is frankly, not often useful, but has its occasional uses when dealing with GIF transparency and the like.


Constructor Summary
MapColorsFilter()
          Construct a MapColorsFilter.
MapColorsFilter(int oldColor, int newColor)
          Construct a MapColorsFilter.
 
Method Summary
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 int filterRGB(int x, int y, int rgb)
           
 
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, toString, wait, wait, wait
 

Constructor Detail

MapColorsFilter

public MapColorsFilter()
Construct a MapColorsFilter.


MapColorsFilter

public MapColorsFilter(int oldColor,
                       int newColor)
Construct a MapColorsFilter.

Parameters:
oldColor - the color to replace
newColor - the color to replace it with
Method Detail

filterRGB

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

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