CaptureImage.toBufferObject Method¶
Module: CaptureImage
Definition¶
Copies the image to a buffer in the specified format.
The compression level meaning depends on the algorithm used:
For JPEG compression, the value is the expected quality and may vary from 1 to 100.
For JPEG2000 compression, the value is the compression rate and may vary from 1 to 512.
For PNG compression, the value is the compression rate and may vary from 1 to 10.
For all other formats, the value is ignored.
to_buffer_object(self, capture_image_format: ImageFormat, compression_level: float, buffer: ImageBuffer) -> None
Parameters
capture_image_format
ImageFormatin The output image format.compression_level
floatin The compression level to be applied.buffer
ImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Devices Library execution.
void toBufferObject(ImageFormat captureImageFormat, double compressionLevel, ImageBuffer buffer)
Parameters
captureImageFormat
ImageFormatin The output image format.compressionLevel
doublein The compression level to be applied.buffer
ImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Devices Library execution.
public void ToBufferObject(ImageFormat captureImageFormat, float compressionLevel, ImageBuffer buffer)
Parameters
captureImageFormat
ImageFormatin The output image format.compressionLevel
floatin The compression level to be applied.buffer
ImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Devices Library execution.
public void toBufferObject(ImageFormat captureImageFormat, float compressionLevel, ImageBuffer buffer) throws DevicesException
Parameters
captureImageFormat
ImageFormatin The output image format.compressionLevel
floatin The compression level to be applied.buffer
ImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Devices Library execution.
int id3DevicesCaptureImage_ToBufferObject (
ID3_DEVICES_CAPTURE_IMAGE hCaptureImage,
id3DevicesImageFormat eCaptureImageFormat,
float compressionLevel,
ID3_DEVICES_IMAGE_BUFFER hBuffer)
Parameters
hCaptureImage
ID3_DEVICES_CAPTURE_IMAGEin Handle to the CaptureImage object.eCaptureImageFormat
id3DevicesImageFormatin The output image format.compressionLevel
floatin The compression level to be applied.hBuffer
ID3_DEVICES_IMAGE_BUFFERin The image buffer that receives the image data.
Returns