Function | Description |
public static native byte [] WSQ_decode_stream(byte [] input, int [] imageProperties) | Decodes memory stream (memory block) from WSQ format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] WSQ_encode_stream(byte [] input, int width, int height, double bitrate, int ppi, String comment_text) | Encodes memory stream (memory block) from uncompressed format into WSQ format. Returns 1 if successful, or error code otherwise. |
public static native void WriteWSQ_bitrate(double bitrate) | Sets current WSQ bitrate. For example 0.75, 2.25 (-1.0 if unknown) |
public static native double ReadWSQ_bitrate() | Reads current WSQ bitrate. For example 0.75, 2.25 (-1.0 if unknown) |
public static native void WriteWSQ_ppi(int ppi) | Sets current WSQ ppi (pixels per inch). Value "-1" is used for unknown ppi. |
public static native int ReadWSQ_ppi() | Reads current WSQ ppi (pixels per inch). Value "-1" is used for unknown ppi. |
public static native int ReadWSQ_implementation_number() | Reads current WSQ implementation number |
public static native void WriteWSQ_comment(String comment) | Sets current WSQ comment text. |
public native String ReadWSQ_comment() | Reads current WSQ comment text. |
public static native byte [] JP2_decode_stream(byte [] input, int [] imageProperties) | Decodes memory stream (memory block) from JP2 format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] JP2_encode_stream(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into JP2 format. Returns 1 if successful, or error code otherwise. |
public static native byte [] JPC_decode_stream(byte [] input, int [] imageProperties) | Decodes memory stream (memory block) from JPC format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] JPC_encode_stream(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into JPC format. Returns 1 if successful, or error code otherwise. |
public static native byte [] PBM_decode_stream(byte [] input, int [] imageProperties) | Decodes memory stream (memory block) from PBM format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] PBM_encode_stream(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into PBM format. Returns 1 if successful, or error code otherwise. |
public static native byte [] PGM_decode_stream(byte [] input, int [] imageProperties) | Decodes memory stream (memory block) from PGM format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] PGM_encode_stream(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into PGM format. Returns 1 if successful, or error code otherwise. |
public static native byte [] PPM_decode_stream(byte [] input, int [] imageProperties) | Decodes memory stream (memory block) from PPM format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] PPM_encode_stream(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into PPM format. Returns 1 if successful, or error code otherwise. |
public static native byte [] CreateImageFromNISTType8UncompressedBinaryField(byte [] input, int width, int height) | Decodes memory stream (memory block) from ANSI/NIST-ITL 1-2000 Type-8 signature (Uncompressed scanned binary image data) format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] CreateImageFromNISTType8CompressedBinaryField(byte [] input, int width, int height) | Decodes memory stream (memory block) from ANSI/NIST-ITL 1-2000 Type-8 signature (ANSI/EIA-538-1988 facsimile compression) format into uncompressed format. Returns 1 if successful, or error code otherwise. |
public static native byte [] CreateNISTType8UncompressedBinaryFieldfromImage(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into ANSI/NIST-ITL 1-2000 Type-8 signature (Uncompressed scanned binary image data) format. Returns 1 if successful, or error code otherwise. |
public static native byte [] CreateNISTType8CompressedBinaryFieldfromImage(byte [] input, int width, int height) | Encodes memory stream (memory block) from uncompressed format into ANSI/NIST-ITL 1-2000 Type-8 signature (ANSI/EIA-538-1988 facsimile compression) format. Returns 1 if successful, or error code otherwise. |
public static native String GenerateWSQLibrarySerialNumber() | Generates serial number for registration of WSQ image library. |
public static native int UnlockWSQLibrary(String authorization_code) | Registers WSQ image library on the device. Returns 1 if successful, 0 otherwise. |
Below are obsolete functions which do not work on Android 10 and later:
| Android 10 introduced new storage paradigm for apps called scoped storage. Scoped storage changes the way apps store and access files on a device's external storage.
In Android 10 apps can no longer read files using filename, now you have to use Uri for file reading.
|
public static native int [] ReadImageFromFile(int [] dimension, String fileName) | Creates an image data array from an image file. The extension of the file name determines the file type. Returns an 1 if successful, 0 otherwise. |
public static native void SaveImageToFile(int [] data, int width, int height, String fileName, int type) | Saves the contents of an image data array to a file. Returns 1 if successful, 0 otherwise.
"filetype" denotes integer with possible values: 1 - WSQ 2 - Windows BMP 3 - TIFF 4 - PNG 5 - JPEG 6 - Targa 7 - RGB |
public static native void WriteTIFFcompression(int tiff_compression) | Sets the TIFF compression type. Available options are:
0 - NONE
1 - ZIP compression
(if ZIP compression is used, you also need to set TIFF "predictor" parameter)
2 - MACINTOSH compression |
public static native void WriteTIFFpredictor(int tiff_predictor) | Sets the TIFF ZIP compression predictor value. |
public static native void Set_Path_of_WSQ_library(String path_of_WSQ_library) | Sets path of "WSQ image library". |