Class encapsulating fingerprint image data plus associated metadata.
This structure is used by FingerprintListener to deliver the results of successful fingerprint image captures to the user.
Thread safety:
Classes | |
enum | TypeID |
Enumeration of fingerprint image types for capture and enrolment functions. More... | |
Public Member Functions | |
FingerprintImage () | |
Default construction - null (empty) image. | |
FingerprintImage (@NonNull byte[] initData, @NonNull TypeID initType, int initRows, int initColumns) | |
Construction with given image data and metadata. More... | |
int | columns () |
Query the number of pixel columns in the image. More... | |
byte [] | data () |
Query the contents of the fingerprint image. More... | |
String | generateBase64 (@NonNull ErrorCode error) |
Encode a fingerprint image as a MIME-compliant Base64 string. More... | |
byte [] | generateBitmap (@NonNull ErrorCode error) |
Attempt to generate a grey-scale bitmap (BMP/DIB format) from the image. More... | |
TypeID | imageType () |
Query the type of image data represented by the object. More... | |
int | rows () |
Query the number of pixel rows in the image. More... | |
void | setColumns (int newColumns) |
Set the number of pixel columns in the image. More... | |
void | setData (@NonNull byte[] newData) |
Set the contents of the fingerprint image. More... | |
void | setImageType (@NonNull TypeID newType) |
Set the type of image data represented by the object. More... | |
void | setRows (int newRows) |
Set the number of pixel rows in the image. More... | |
String | typeName () |
Obtain the name of the current image type ID. More... | |
Static Public Member Functions | |
static String | typeName (@NonNull TypeID imageType) |
Obtain the name of a given image type ID. More... | |
FingerprintImage | ( | @NonNull byte [] | initData, |
@NonNull TypeID | initType, | ||
int | initRows, | ||
int | initColumns | ||
) |
Construction with given image data and metadata.
initData | Initial value of the image data, passed by copy |
initType | Initial value of the image type ID |
initRows | Initial count of pixel rows in the image; must be non-negative |
initColumns | Initial count of pixel columns in the image; must be non-negative |
IllegalArgumentException | if any of the supplied parameters are invalid |
int columns | ( | ) |
Query the number of pixel columns in the image.
byte [] data | ( | ) |
Query the contents of the fingerprint image.
For uncompressed images this will use a raw 8bpp grayscale format - i.e. one byte per pixel, scanning left to right within each row, and rows ordered from top to bottom. No header or footer data is included.
For images in the V1 or WSQ formats, the specified data format is used; refer to the relevant format specifications for additional details.
String generateBase64 | ( | @NonNull ErrorCode | error | ) |
Encode a fingerprint image as a MIME-compliant Base64 string.
If the supplied error code indicates no prior errors, and the image is not in the V1 compression format, then an attempt will be made to convert the fingerprint image to the BMP (DIB) format as per generateBitmap(). The resultant image data is then encoded as a Base64 string, with a suitable MIME type header prepended.
error | Error code; operation proceeds only if set to NO_ERROR. If an error is detected during this operation, then the parameter will be updated with the details. |
byte [] generateBitmap | ( | @NonNull ErrorCode | error | ) |
Attempt to generate a grey-scale bitmap (BMP/DIB format) from the image.
If the supplied error code indicates no prior errors, and the image is not in the V1_COMPRESSION format, then an attempt will be made to convert that image to the Microsoft BMP (DIB) format.
Image data for this function is typically taken from a FingerprintListener.imageEvent callback parameter.
error | Error code; operation proceeds only if set to NO_ERROR. If an error is detected during this operation, then the parameter will be updated with the details. |
TypeID imageType | ( | ) |
Query the type of image data represented by the object.
int rows | ( | ) |
Query the number of pixel rows in the image.
void setColumns | ( | int | newColumns | ) |
Set the number of pixel columns in the image.
newColumns | New number of pixel columns |
void setData | ( | @NonNull byte [] | newData | ) |
Set the contents of the fingerprint image.
Refer to data() for the details of the format.
newData | Image contents, represented in the specified format |
void setImageType | ( | @NonNull TypeID | newType | ) |
Set the type of image data represented by the object.
newType | New image type in the TypeID format |
void setRows | ( | int | newRows | ) |
Set the number of pixel rows in the image.
newRows | New number of pixel rows |
String typeName | ( | ) |
Obtain the name of the current image type ID.
|
static |
Obtain the name of a given image type ID.
imageType | The type of image which is being queried |