com.jhlabs.image

Class SwizzleFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class SwizzleFilter
extends PointFilter

A filter which allows channels to be swapped. You provide a matrix with specifying the input channel for each output channel.

Field Summary

Fields inherited from class com.jhlabs.image.PointFilter

canFilterIndexColorModel

Constructor Summary

SwizzleFilter()

Method Summary

int
filterRGB(int x, int y, int rgb)
int[]
getMatrix()
Get the swizzle matrix.
void
setMatrix(int[] matrix)
Set the swizzle matrix.
String
toString()

Methods inherited from class com.jhlabs.image.PointFilter

filter, filterRGB, setDimensions

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Constructor Details

SwizzleFilter

public SwizzleFilter()

Method Details

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Overrides:
filterRGB in interface PointFilter

getMatrix

public int[] getMatrix()
Get the swizzle matrix.
Returns:
the matrix

setMatrix

public void setMatrix(int[] matrix)
Set the swizzle matrix.
Parameters:
matrix - the matrix

toString

public String toString()