INNER CODE UNIT · Python
create_image
fury-gl/fury · fury/actor/core.py:324
def create_image(image_input, material, **kwargs):
"""
Create an image object.
Parameters
----------
image_input : str or np.ndarray
The image content. Can be a file path (string) to an image file,
or a NumPy array. Supported array shapes:
- (H, W) for grayscale images
- (H, W, 1) for single-channel images (squeezed to grayscale)
- (H, W, 3) for RGB images (converted to RGBA internally)
- (H, W, 4) for RGBA images
material : ImageBasicMaterial
The material object.
**kwargs : dict, optional
Additional properties like position, visible, etc.