At the moment i’m using this method to create an IntBuffer from an image file :
BufferedImage img = ImageIO.read(input);
int[] rgbs = new int[img.getWidth()*img.getHeight()];
IntBuffer buffer = IntBuffer.wrap(img.getRGB(0,0,img.getWidth(),img.getHeight(),rgbs,0,img.getWidth()));
Is there a better way to do this ?
Koen