Image.toBufferObject Method¶
Module: Image
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, image_format: ImageFormat, compression_level: float, buffer: ImageBuffer) -> None
Parameters
image_formatImageFormatin The output image format.compression_levelfloatin The compression level to be applied.bufferImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Face Library execution.
void toBufferObject(ImageFormat imageFormat, double compressionLevel, ImageBuffer buffer)
Parameters
imageFormatImageFormatin The output image format.compressionLeveldoublein The compression level to be applied.bufferImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Face Library execution.
public void ToBufferObject(ImageFormat imageFormat, float compressionLevel, ImageBuffer buffer)
Parameters
imageFormatImageFormatin The output image format.compressionLevelfloatin The compression level to be applied.bufferImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Face Library execution.
public void toBufferObject(ImageFormat imageFormat, float compressionLevel, ImageBuffer buffer) throws FaceException
Parameters
imageFormatImageFormatin The output image format.compressionLevelfloatin The compression level to be applied.bufferImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Face Library execution.
public func toBufferObject(imageFormat: ImageFormat, compressionLevel: Float, buffer: ImageBuffer) throws
Parameters
imageFormatImageFormatin The output image format.compressionLevelFloatin The compression level to be applied.bufferImageBufferin The image buffer that receives the image data.
Exceptions
An error has occurred during Face Library execution.
int id3FaceImage_ToBufferObject (
ID3_FACE_IMAGE hImage,
id3FaceImageFormat eImageFormat,
float compressionLevel,
ID3_FACE_IMAGE_BUFFER hBuffer)
Parameters
hImageID3_FACE_IMAGEin Handle to the Image object.eImageFormatid3FaceImageFormatin The output image format.compressionLevelfloatin The compression level to be applied.hBufferID3_FACE_IMAGE_BUFFERin The image buffer that receives the image data.
Returns