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

Brian Granger ellisonbg@gmail....
Thu Feb 23 12:07:46 CST 2012


Yes, that will work, but we should add width/height keyword args to
the Image class.  Could you create a github issue for this?

Cheers,

Brian

2012/2/23 Zoltán Vörös <zvoros@gmail.com>:
> Hi Antony,
>
> Your question was addressed to Brian, but perhaps, you won't mind, if I
> answer. You could do something like this
>
> from IPython.core.display import HTML
> HTML('<img src="files/python-logo.svg" width=100 height=20/>')
>
> I hope this helps.
> Cheers,
> Zoltán
>
> On 02/23/2012 05:14 PM, Anthony Tanbakuchi wrote:
>> Brian,
>>
>> 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
>> before displaying.
>>
>> Thanks,
>>
>> 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