I have a little problem. I am learning to program games in Java , and I watched a tutorial on using BufferedImage to acess each pixel by array, I mean :
int[] pixels = ((DataBufferInt) screen.getRaster().getDataBuffer()).getData();
It all works, but I do not understand it, when I pick all the pixels from that image and store them to array called pixels, then I just change color data in that array and it works like I changed the data in the actual image, and I didn't put anything from array back to the BufferedImage. Can you please explain it? Thanks