Creating TIFF Documents | Flutter Document Scanner
TIFF Creation
ScanbotSdk.createTiff(pages, options);
The Scanbot SDK renders the given page images into a multi-page TIFF file and stores it as a file. For each DOCUMENT image a separate page is generated.
List<Page> pages = ...
var options = TiffCreationOptions(binarized: true, dpi: 300, compression: TiffCompression.CCITT_T6);
Uri tiffFileUri = await ScanbotSdk.createTiff(pages, options);
Arguments:
pages
- a list of valid Page objects. Eachpage
should have the cropped DOCUMENT image.options
-TiffCreationOptions
:binarized
: Optional boolean flag to create binarized (one bit encoded) black-and-white images. Iftrue
, the input images will be binarized and the output TIFF file will be saved with one bit per pixel. Iffalse
, the input images will be stored as-is. The default value is true.dpi
: Dots Per Inch as an optional integer value. The default value is 200 dpi. Please note that the DPI value is just meta data. It does not affect the quality or the resolution of the TIFF image file. The resolution of the output TIFF images will stay the same as that of the input images.compression
: Optional TIFF compression type. Default value isLZW
. See supported types below.
Supported TIFF compression types:
TiffCompression.CCITTRLE
TiffCompression.CCITTFAX3
TiffCompression.CCITT_T4
TiffCompression.CCITTFAX4
TiffCompression.CCITT_T6
TiffCompression.CCITTRLEW
TiffCompression.LZW
TiffCompression.PACKBITS
TiffCompression.DEFLATE
TiffCompression.ADOBE_DEFLATE
⚠️️️ Please note that some compression types are only compatible for binarized images (1-bit encoded black & white images)!
See the list PredefinedCompressionTypes.binarizedOnlyCompressionTypes()
.
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.