Image negatives have their colors inverted into complementary colors. Technically, for the 24-bit color mode, in order to create a negative, each pixel's color should be reversed in the following way:
Red = 255 - Red
Green = 255 - Green
Blue = 255 - Blue
The following code reads an image data into a BufferedImage instance and then inverts all pixels' color. Put the code lines in the correct order.
The "for loop" with the x variable precedes the "for loop" with the y variable.
Note that each click on the right arrow inserts 4 spaces for indentation.