title: How do I compare screenshots taken in pyscreenshot with saved screenshots?
body: <p>I have created a program in python using pyscreenshot which periodically takes a screenshot of a specific area of screen which will contain one of several pre-defined images. I am looking to load each of these images from file into a list and compare them with the screenshot to see which is currently displayed. Initially the files were created by screenshotting the images as they were on screen:</p>
  
  <pre><code>while True:
  
  filenm = str(i) + ".png"
  im=ImageGrab.grab(bbox=(680,640,735,690)) #accross, down
  im.save(filenm)
  time.sleep(1)
  i = i + 1
  </code></pre>
  
  <p>Then when I attempt to compare them it always reports false:</p>
  
  <pre><code>image2 = Image.open("04.png")
  
  im=ImageGrab.grab(bbox=(680,640,735,690)) #accross, down
  
  if im == image2:
      print "TRUE"
  else:
      print "FALSE"
  </code></pre>
  
  <p>However comparing two of the images saved to files works:</p>
  
  <pre><code>image = Image.open("03.png")
  image2 = Image.open("04.png")
  
  if image == image2:
      print "TRUE"
  else:
      print "FALSE"
  </code></pre>
  
  <p>So my question is how do the images differ once loaded from file and how can I compare the 'live' screenshot with an image loaded from file?</p>