public class ColorMapFilter extends Filter
A ColorMapFilter is a Filter that uses a Map<Color,Color> to replace some RGB values with others in the filtered image. For each key in the ColorMapFilter's Map with an alpha value of 1, all pixels in the original image that share their RGB value with that key will have their RGB value replaced with that of the key's value in the Map. The Map's values' alpha values are irrelevant to the ColorMapFilter's behavior, and the alpha values of the original image's pixels are left unchanged in the filtered image.
Color
Constructor and Description |
---|
ColorMapFilter(Color key,
Color value)
Constructs a ColorMapFilter with a Map that maps the specified key Color
to the specified value Color.
|
ColorMapFilter(java.util.Map<Color,Color> colorMap)
Constructs a ColorMapFilter that uses a copy of the specified Map.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<Color,Color> |
getColorMap()
Returns an unmodifiable view of the Map that this ColorMapFilter uses.
|