I get the pixels from BufferedImage using the method getRGB(). The pixels are stored in array called data[]. After some manipulation o
BufferedImage
getRGB()
data[]
BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
Then set the pixels again.
bufferedImage.setRGB(x, y, your_value);
PS: as stated in the comments, please use the answer from @TacticalCoder