Skip to content

Note

Click here to download the full example code

Image widget#

Example of creating an Image Widget from a file.

(This requires pillow, or that magicgui was installed as magicgui[image])

image

Out:

Image(200x232x3, name='')


from magicgui.widgets import Image

image = Image(value="../../images/_test.jpg")
image.scale_widget_to_image_size()
image.show(run=True)

Total running time of the script: ( 0 minutes 0.040 seconds)

Download Python source code: image.py

Download Jupyter notebook: image.ipynb

Gallery generated by mkdocs-gallery