edifice.extra.numpy_image.NumpyImage#
- class edifice.extra.numpy_image.NumpyImage(src, aspect_ratio_mode=None, **kwargs)[source]#
Bases:
QtWidgetElementRender a
numpyarray as an image.Requres numpy.
Underlying Qt Widget QLabel
Props
All props from
edifice.QtWidgetElementplus:- Parameters:
src (
NumpyArray[uint8]) –A
NumpyArraywrapping anumpy.ndarrayofuint8.Allowed shapes:
(height, width)(height, width, 1)(height, width, 3)(height, width, 4)
aspect_ratio_mode (
Optional[AspectRatioMode]) –The aspect ratio mode of the image.
Nonefor a fixed image which doesn’t scale.An AspectRatioMode to specify how the image should scale.
Methods
__init__(src[, aspect_ratio_mode])register_ref(reference)Registers provided
Referenceto this Element.set_key(key)Set the key of an
Element.Attributes
childrenThe children of this Element.
propsThe props of this Element.
underlyingThe underlying QWidget, which may not exist if this Element has not rendered.