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

Snippets has posted 5883 posts at DZone. View Full User Profile

Java - SubTraction

11.05.2006
| 7834 views |
  • submit to reddit
        // 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);
	}