Image.fromNumpy Method

Module: Image

Definition

Creates an Image from the specified data buffer. Supported pixel formats are grayscale formats, BGR and RGB 24bits, and BGRA. For integers format, input datatype must be UINT8.

@staticmethod
from_numpy(data: bytearray, pixel_format: PixelFormat) -> Image

Parameters

data bytearray
in A numpy array containing the image data.

pixel_format PixelFormat
in The pixel format of the image.

Returns

The newly created image.

Exceptions

An error has occurred during Face Library execution.