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)
If useful, try this:
BufferedImage imgBuffer = ImageIO.read(new File("c:\\image.bmp")); byte[] pixels = (byte[])imgBuffer.getRaster().getDataElements(0, 0, imgBuffer.getWidth(), imgBuffer.getHeight(), null);