Whatever it is he wants, it's probably achievable with AlphaComposite or BlendComposite. If so, there's no need to reinvent the wheel (unless of course if this is homework).
There are no new questions, but there may be new answers.
posted 7 years ago
I want to do this logical operation (as shown in image screenshot) on binary image ?
I did it using BufferedImage. I take the each pixel from two images and do logical operation on that pixel and setting that pixel.(used getRGB and setRGB).
the result i get attached as LogicalOPeration.
what's wrong with AND and OR operation in my result ?
Now we see what you want, AlphaComposite is what you should use. If we define IMG_1 as the source and IMG_2 as the destination, you can use the following rules:
- SRC_IN for AND
- SRC_OVER for OR
- CLEAR for XOR
- DST_OUT for NOT-AND