title: how can I use the python imaging library to create a bitmap
body: <p>I have a 2d list in python, and I want to make a graphical pic of the data. Maybe a n by m column grid where each square is a different color of grey depending on the value in my 2d list.</p>
  
  <p>However, I can't seem to figure out how to create images using PIL. This is some of the stuff I've been messing with:</p>
  
  <pre><code>def createImage():
      img = Image.new('L', (100,100), 'white')
      img.save('test.bmp')
  
      for i in range(0,15):
          for j in range(0,15):
              img.putpixel((i,j), (255,255,255))
  </code></pre>
  
  <p>However, I'm getting an error saying that an integer is required (problem on the line with the putpixel)</p>