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
bytearrayin A buffer that contains the image data.pixel_format
PixelFormatin 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
Uint8Listin A buffer that contains the image data.pixelFormat
PixelFormatin 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
PixelFormatin 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
PixelFormatin 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
hCaptureImage
ID3_DEVICES_CAPTURE_IMAGEin Handle to the CaptureImage object.data
unsigned char *in A buffer that contains the image data.dataSize
intin Size of the ‘data’ buffer.ePixelFormat
id3DevicesPixelFormatin The destination pixel format to convert the input to.
Returns