I\'m looking for the fastest way to get pixel data (int the form int[][]) from a BufferedImage. My goal is to be able to address pixel (x, y) from
int[][]
(x, y)
This worked for me:
BufferedImage bufImgs = ImageIO.read(new File("c:\\adi.bmp")); double[][] data = new double[][]; bufImgs.getData().getPixels(0,0,bufImgs.getWidth(),bufImgs.getHeight(),data[i]);