|
void | finalize () throws Throwable |
|
An image keeps bitmap data in 24bpp RBG format. Use loadImageFromData(byte[]), loadImageFromFile(String) and makeImageFromData(byte[], int, int) functions for instantiate the image.
◆ getData()
byte [] com.tech5.FaceSDK.Image.getData |
( |
| ) |
|
|
inline |
data array of bitmap.
- Returns
- a copy of data bitmap, where length is width*stride*height.
◆ getHeight()
int com.tech5.FaceSDK.Image.getHeight |
( |
| ) |
|
|
inline |
image height in pixels.
- Returns
- height in pixels.
◆ getStride()
long com.tech5.FaceSDK.Image.getStride |
( |
| ) |
|
|
inline |
bitmap row size in bytes.
- Returns
- row size in bytes.
◆ getWidth()
int com.tech5.FaceSDK.Image.getWidth |
( |
| ) |
|
|
inline |
image width in pixels.
- Returns
- width in pixels.
◆ loadImageFromData()
Decodes image from memory. Image must be in RBG or BRG channels order. Grayscale or images with alfa-channel not allowed.
- Parameters
-
data | array with encoded image. |
- Returns
- the loaded image.
- Exceptions
-
FaceSDKException | in case of an error in native code. |
IllegalArgumentException | if data is null or empty. |
◆ loadImageFromFile()
Decodes image from file. Image must be in RBG or BRG channels order. Grayscale or images with alfa-channel not allowed.
- Parameters
-
fileName | Path to file with an encoded image. |
- Returns
- the loaded image.
- Exceptions
-
FaceSDKException | in case of an error in native code. |
IllegalArgumentException | if fileName is null or empty. |
◆ makeImageFromData() [1/2]
static Image com.tech5.FaceSDK.Image.makeImageFromData |
( |
byte [] |
data, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| throws FaceSDKException |
|
inlinestatic |
Makes image object from bitmap. Bitmap must 24bpp RGB format. Assumes stride is width*3
- Parameters
-
data | array with bitmap. |
width | bitmap width in pixels. |
height | bitmap height in pixels. |
- Returns
- the loaded image.
- Exceptions
-
FaceSDKException | in case of an error in native code. |
IllegalArgumentException | if data is null or empty. |
◆ makeImageFromData() [2/2]
static Image com.tech5.FaceSDK.Image.makeImageFromData |
( |
byte [] |
data, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
stride |
|
) |
| throws FaceSDKException |
|
inlinestatic |
Makes image object from bitmap with specified stride. Bitmap must 24bpp RGB format.
- Parameters
-
data | array with bitmap. |
width | bitmap width in pixels. |
height | bitmap height in pixels. |
stride | bitmap row size in bytes. |
- Returns
- the loaded image.
- Exceptions
-
FaceSDKException | in case of an error in native code. |
IllegalArgumentException | if data is null or empty. |
The documentation for this class was generated from the following file:
- E:/git/face_sdk/java/lib/src/main/java/com/tech5/FaceSDK/Image.java