Have you gone through the Images and Pixels tutorial yet? About halfway, at the example called Displaying the pixels of an image, they show how the stored pixels (your 0 to 10.000 situation) gets converted to an image (the 100x100 grid you want to make).