I'm trying to display an image in the ipython qtconsole via:
from IPython.display import Image
Image(filename='sky1024px.jpg')
But I get the following output
Out[6]: <IPython.core.display.Image object>
I installed python via Anaconda which has the needed library to display images. I tried searching stackoverflow and couldn't find any answers yet.
The version of python i'm running is:
IPython QtConsole 3.2.0
Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, May 28 2015, 17:04:42)
The reason I want to get this working is I'm messing around with the google deepdream project which looks pretty fun and crazy. See: https://github.com/google/deepdream/blob/master/dream.ipynb
Sorry if this is simple question never used python and i'm been banging my head on this for a few hours!
Thanks!
To display the image, the Ipython. display() method necessitates the use of a function. In the notebook, you can also specify the width and height of the image.
The Qtconsole is a very lightweight application that largely feels like a terminal, but provides a number of enhancements only possible in a GUI, such as inline figures, proper multiline editing with syntax highlighting, graphical calltips, and more.
I found after I'd used display
once Image
s were rendered:
from IPython.core.display import Image, display
display(Image('https://upload.wikimedia.org/wikipedia/commons/2/2a/Svm_max_sep_hyperplane_with_margin.png'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With