DocumentImage.fromNumpy Method

Module: DocumentImage

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) -> DocumentImage

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 document image.

Exceptions

An error has occurred during Document Library execution.