FingerImage.toBuffer Method¶
Module: FingerImage
Definition¶
Exports the image to a buffer.
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(self, finger_image_format: ImageFormat, compression_level: float) -> bytearray
Parameters
finger_image_format
ImageFormatin The image format to export the image to.compression_level
floatin The compression level to be applied.
Returns
bytearray
Buffer that receives the image data.
Exceptions
An error has occurred during Finger Library execution.
Uint8List toBuffer(ImageFormat fingerImageFormat, double compressionLevel)
Parameters
fingerImageFormat
ImageFormatin The image format to export the image to.compressionLevel
doublein The compression level to be applied.
Returns
Uint8List
Buffer that receives the image data.
Exceptions
An error has occurred during Finger Library execution.
public byte[] ToBuffer(ImageFormat fingerImageFormat, float compressionLevel)
Parameters
fingerImageFormat
ImageFormatin The image format to export the image to.compressionLevel
floatin The compression level to be applied.
Returns
byte[]
Buffer that receives the image data.
Exceptions
An error has occurred during Finger Library execution.
public byte[] toBuffer(ImageFormat fingerImageFormat, float compressionLevel) throws FingerException
Parameters
fingerImageFormat
ImageFormatin The image format to export the image to.compressionLevel
floatin The compression level to be applied.
Returns
byte[]
Buffer that receives the image data.
Exceptions
An error has occurred during Finger Library execution.
public func toBuffer(fingerImageFormat: ImageFormat, compressionLevel: Float) throws -> [UInt8]
Parameters
fingerImageFormat
ImageFormatin The image format to export the image to.compressionLevel
Floatin The compression level to be applied.
Returns
[UInt8]
Buffer that receives the image data.
Exceptions
An error has occurred during Finger Library execution.
int id3FingerImage_ToBuffer (
ID3_FINGER_IMAGE hFingerImage,
id3FingerImageFormat eFingerImageFormat,
float compressionLevel,
unsigned char * data,
int * dataSize)
Parameters
hFingerImage
ID3_FINGER_IMAGEin Handle to the FingerImage object.eFingerImageFormat
id3FingerImageFormatin The image format to export the image to.compressionLevel
floatin The compression level to be applied.data
unsigned char *out Buffer that receives the image data.dataSize
int *in Size of the ‘data’ buffer. Receives the number of elements in the ‘data’ array.
Returns