title: Turning binary string into an image with PIL
body: <p>So, what I'm trying to do is have PIL create an image based on a string of binary. 
  Some backstory:</p>
  
  <pre><code>from PIL import Image
  
  value = "0110100001100101011011000110110001101111"
  vdiv = [value[i:i+8] for i in range(0, len(value), 8)]
  </code></pre>
  
  <p>^This creates a list of bytes from the binary string. <code>['01101000', '01100101',.....]</code></p>
  
  <pre><code>def diff(inp):
      if inp == '1':
          return (0,0,0)
      if inp == '0':
          return (255,255,255)
      else:
          pass
  </code></pre>
  
  <p>^This returns a color tuple for each corresponding bit, and if I call:</p>
  
  <pre><code>for i in vdiv:
      for i2 in i:
          print diff(i2)
  </code></pre>
  
  <p>It will print every color tuple for each bit in the bytes listed. <code>(0,0,0) (0,0,0) (255,255,255)...</code></p>
  
  <p>What I want to know is, How can I get PIL to create an image where the pixels match the binary string?</p>
  
  <p><strong>Here is what it should look like.</strong>: <img src="https://i.imgur.com/QwToLCm.png" alt="screenshot"></p>
  
  <p>What I have so far for PIL:</p>
  
  <pre><code>img = Image.new( 'RGB', (8,len(vdiv)), "white")
  pixels = img.load()
  
  ##
  for x in range(img.size[0]):
      for y in range(img.size[1]):
          for i in vdiv:
              for i2 in i:
                  pixels[x,y] = diff(i2) #Creates a black image. What do?
  ##
  
  img.show()
  </code></pre>
  
  <p>It is the <code>for x in range</code> bit that gets me. I am lost.</p>