[IPython-User] ipython notebook - how to display image (not from pylab)
Thu Feb 23 10:14:41 CST 2012
Thanks, using Image(filename='myimage.png') works well.
One additional question that I couldn't find from the documents. Is
there a way that I can specify the html image width / height
properties for the displayed image?
Annoyingly, the package I'm using generates very large PNG files that
display way to large to view in the notebook without lots of
scrolling. I'm trying to figure out how to change the output in the
package, but in the mean time, can I just use HTML tags to scale the
image? I'd rather not have to down size the images via post processing
On Wed, Feb 22, 2012 at 9:27 PM, Brian Granger <email@example.com> wrote:
> There are a couple of ways of doing this, but the simplest is the following:
> from IPython.core.display import Image
> On Wed, Feb 22, 2012 at 7:59 PM, Anthony Tanbakuchi
> <firstname.lastname@example.org> 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
>> Thanks for the great work on the notebook server. It's a great tool.
>> IPython-User mailing list
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> email@example.com and firstname.lastname@example.org
> IPython-User mailing list
More information about the IPython-User