title: IPython.core.display.Image object can't be displayed in spyder while PIL.Image is ok
body: <p>I imported the module below:</p>
  
  <pre><code>from io import BytesIO
  import PIL.Image
  from IPython.display import clear_output, Image, display
  import numpy as np
  </code></pre>
  
  <p>and save image data to bytesio:</p>
  
  <pre><code>f = BytesIO()
  a = (np.eye(200)*255).astype('uint8')
  PIL.Image.fromarray(a).save(f, 'jpeg')
  </code></pre>
  
  <p>Then display it with:</p>
  
  <pre><code>display(Image(data=f.getvalue(), format='jpeg'))
  </code></pre>
  
  <p>I saw similar issue in <a href="https://stackoverflow.com/questions/43227758/how-to-display-image-in-mandlebrot-tensorflow-program-current-output-is-ipython">how to display image in Mandlebrot tensorflow program.Current output is </a> someone says spyder just can't do it. But it works well if I use PIL image:</p>
  
  <pre><code>display(PIL.Image.open(f))
  </code></pre>
  
  <p>Can anyone help to explain why the Ipython Image object can't work here?</p>