DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Java - SubTraction
// Use JAI filter
public RenderedImage subTraction(BufferedImage img1, BufferedImage img2)
{
ParameterBlock pb = new ParameterBlock();
pb.addSource(img1);
pb.addSource(img2);
return JAI.create("subtract", pb);
}





