[IPython-User] ipython notebook - how to display image (not from pylab)

Brian Granger ellisonbg@gmail....
Wed Feb 22 22:27:35 CST 2012


There are a couple of ways of doing this, but the simplest is the following:

from IPython.core.display import Image
Image('myimage.png')

Cheers,

Brian

On Wed, Feb 22, 2012 at 7:59 PM, Anthony Tanbakuchi
<anthony@tanbakuchi.com> wrote:
> I have a custom module that generates a png image file from some
> calculations (sadly it doesn't work well for me to use matplotlib to
> display this image). It's rather slow to read the image back in to
> matplotlib and display it since it is somewhat large. How can I embed
> my image similar to how it is done for the pylab inline option?
>
> Are there any special hooks in the notebook where I can easily do
> this? Or is there a way I could just print the html code to display
> the image file inline? Something like print '<img src="file.png"/>'
> and have that displayed in the notebook as html rather than code
> output.
>
> Thanks for the great work on the notebook server. It's a great tool.
>
> -Anthony
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com


More information about the IPython-User mailing list