title: PIL open() method not working with BytesIO
body: <p>For some reason, when I try to make an image from a BytesIO steam, it can't identify the image. Here is my code:</p>
  
  <pre><code>from PIL import Image, ImageGrab
  from io import BytesIO
  
  i = ImageGrab.grab()
  i.resize((1280, 720))
  output = BytesIO()
  i.save(output, format = "JPEG")
  output.flush()
  print(isinstance(Image.open(output), Image.Image))
  </code></pre>
  
  <p>And the stack trace of the error it throws:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Natecat/PycharmProjects/Python/test.py", line 9, in &lt;module&gt;
      print(isinstance(Image.open(output), Image.Image))
    File "C:\Python27\lib\site-packages\PIL\Image.py", line 2126, in open
      % (filename if filename else fp))
  IOError: cannot identify image file &lt;_io.BytesIO object at 0x02394DB0&gt;
  </code></pre>
  
  <p>I am using the Pillow implementation of PIL.</p>