Subtracting two RenderedImages manually
I want to subtract one RenderedImage from another to create a new difference image. The problem is I need to ignore pixels which have a certain value in either of the input images.
Is there a way of doing this using JAI operators? I was thinking of creating some kind of mask which I could apply to the result of the subtraction.
Failing that, how could I manually subtract the images without using the JAI Subtract operator? I understand I can loop through pixel by pixel, but I don't know how to create a new blank image from scratch to put the results in.
Any help would be appreciated.