{
// first retrieve the pixels
ImageLoader il = new ImageLoader(image);
il.start();
if(!il.waitFor()){
throw new IllegalArgumentException("Problem loading...");
}
int width = image.getWidth(il);
int height = image.getHeight(il);
int[] pixels = new int[width*height]; // all the image's pixels