Here you can find the source of loadImageData(BufferedImage image)
public static int[] loadImageData(BufferedImage image)
//package com.java2s; //License from project: Open Source License import java.awt.image.BufferedImage; public class Main { public static int[] loadImageData(BufferedImage image) { int w = image.getWidth(); int h = image.getHeight(); int[] pixels = image.getRGB(0, 0, w, h, null, 0, w); return pixels; }/*from w ww. j a v a 2 s .c o m*/ }