Creating TIFF documents with the Android Document Scanner SDK
The Scanbot SDK provides the ability to write scanned images into a TIFF file.
The TIFF generator includes convenient functions to write scanned images into a multi-page TIFF file, adjust the file's parameters, and encrypt the newly created file.
Note: The SDK can optionally encrypt the TIFF file, offering a high level of protection. To decrypt the TIFF file, you can use a provided encryption key or generate the key yourself using a combination of salt, password, and iterations.
Example code for creating a TIFF from a 'Document' object
If you're working with a Document object, you can create a TIFF like this:
loading...
Example code for creating a binarized TIFF from a 'Document' object
If it is required, to create a binarized TIFF file instead, the approach will be slightly different:
loading...
Example code for creating a TIFF from image files
If you're working with images imported from the gallery as bitmaps, you can create a TIFF like this:
loading...
You can omit the TiffGeneratorParameters parameter to use the default TIFF generation settings, in this case TiffGeneratorParameters.default().
You can learn more about TiffGeneratorParameters in the API documentation.
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get free trial license