Original Post
Hello, I am trying to get the pixels from a buffered image along with their RGB values but I seem to get stuck a bit with the code: BufferedImage bufferedImage = new BufferedImage( bi.getWidth(), bi.getHeight(), BufferedImage.TYPE_BYTE_BINARY ); byte[] dd = ( ( DataBufferByte ) bufferedImage.getRaster().getDataBuffer() ).getData(); byte[][] pixels = new byte[dd.length][dd.length]; for(int j=0;j[j] = dd[i*bi.getHeight()+j]; Am I doing it ok so far? And how do I get the RGB values in a 2D array of integers. Then I want to save the picture into java's standard formats, do I go with streams?