I have to do a Java program that contains a panel with an image in it. After the user clicks twice on the image, the program must increase the contrast of the part of the image that is enclosed between these two points and decrease the rest of it. I need some general instructions on how to do this.
I know that I will have to use Java 2D and I know how to increase or decrease the contrast of the image. However, I am not sure how can I separate the image in two parts.
Thanks in advance everybody who answers 🙂
You can use this piece of code. It splits the image into cells and it does the job very well 🙂