CaptureImage.fromBuffer Method

Module: CaptureImage

Definition

Creates an Image from the specified data buffer.

@staticmethod
from_buffer(data: bytearray, pixel_format: PixelFormat) -> CaptureImage

Parameters

data bytearray
in A buffer that contains the image data.

pixel_format PixelFormat
in The destination pixel format to convert the input to.

Returns

The newly created capture image.

Exceptions

An error has occurred during Devices Library execution.
static CaptureImage fromBuffer(Uint8List? data, PixelFormat pixelFormat)

Parameters

data Uint8List
in A buffer that contains the image data.

pixelFormat PixelFormat
in The destination pixel format to convert the input to.

Returns

The newly created capture image.

Exceptions

An error has occurred during Devices Library execution.
public static CaptureImage FromBuffer(byte[] data, PixelFormat pixelFormat)

Parameters

data byte[]
in A buffer that contains the image data.

pixelFormat PixelFormat
in The destination pixel format to convert the input to.

Returns

The newly created capture image.

Exceptions

An error has occurred during Devices Library execution.
public static CaptureImage fromBuffer(byte[] data, PixelFormat pixelFormat) throws DevicesException

Parameters

data byte[]
in A buffer that contains the image data.

pixelFormat PixelFormat
in The destination pixel format to convert the input to.

Returns

The newly created capture image.

Exceptions

An error has occurred during Devices Library execution.
int id3DevicesCaptureImage_FromBuffer (
    ID3_DEVICES_CAPTURE_IMAGE hCaptureImage,
    unsigned char * data,
    int dataSize,
    id3DevicesPixelFormat ePixelFormat)

Parameters

in Handle to the CaptureImage object.

data unsigned char *
in A buffer that contains the image data.

dataSize int
in Size of the ‘data’ buffer.

in The destination pixel format to convert the input to.

Returns

int
An error code.
See id3DevicesError file for the list of possible error codes.