Creating TIFF Documents | React Native Document Scanner
TIFF Creation
ScanbotSDK.writeTIFF(args: WriteTIFFArguments): Promise
The Scanbot SDK renders the given images into a multi-page TIFF file and stores it as a file. For each image a separate page is generated.
WriteTIFFArguments:
imageFileUris
- Input images as an array of file URIs in proper order (image element 1 => page 1, etc).options
- An object containing some of the following properties:oneBitEncoded
- if true, the input images will be binarized and the output TIFF file will be saved with one bit per pixel. If false, the input images will be stored as-is. The default value is false.dpi
- Optional integer value for Dots Per Inches. The default value is200
dpi.compression
- Optional TIFF compression type. The default value depends on theoneBitEncoded
flag.CCITT_T6
(CCITT Fax 4) is the default value for binarized (oneBitEncoded=true
) images. For color images (oneBitEncoded=false
) the default value isADOBE_DEFLATE
(ZIP).
Returns
Returns an object with the following properties:
tiffFileUri
- file URI with the path to the created TIFF file
TIFF Compression Types
Following TIFF compression types are supported:
NONE
: No compression.CCITT_T6
: "CCITT Fax 4" compression type. Most common and recommended type for binarized (1-bit) black and white images to achieve a small TIFF file size.ADOBE_DEFLATE
: "ZIP" compression type. Most common type for color images.CCITTRLE
CCITTFAX3
CCITT_T4
CCITTFAX4
CCITTRLEW
LZW
PACKBITS
DEFLATE
⚠️ Please note that the following compression types are only compatible for binarized images (1-bit encoded black & white images):
CCITTRLE
, CCITTFAX3
, CCITT_T4
, CCITTFAX4
, CCITT_T6
, CCITTRLEW
.
Want to scan longer than one minute?
Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.