File: image.py

package info (click to toggle)
magicgui 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 21,796 kB
  • sloc: python: 11,202; makefile: 11; sh: 9
file content (12 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
"""# Image widget

Example of creating an Image Widget from a file.

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

from magicgui.widgets import Image

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