setTIFFCompressionType()

Description

Sets the compression type for TIFF files.

Syntax

ImageViewerObject.io.setTIFFCompressionType(iValue);

Parameters

<EnumTIFFCompressionType> iValue: the value to set

TIFF compression type Description Supported image format
EnumTIFFCompressionType.AUTO Auto mode 1, 4, 8, 24 bit
EnumTIFFCompressionType.RLE CCITT modified Huffman RLE 1 bit
EnumTIFFCompressionType.FAX3 CCITT Group 3 fax encoding 1 bit
EnumTIFFCompressionType.T4 CCITT T.4 (TIFF 6 name) 1 bit
EnumTIFFCompressionType.FAX4 CCITT Group 4 fax encoding 1 bit
EnumTIFFCompressionType.T6 CCITT T.6 (TIFF 6 name) 1 bit
EnumTIFFCompressionType.LZW Lempel-Ziv & Welch 1, 4, 8, 24 bit
EnumTIFFCompressionType.JPEG JPEG encoding 4, 8, 24 bit
EnumTIFFCompressionType.PACKBITS Macintosh RLE 1, 4, 8, 24 bit

Return value

bool

Remarks

EnumTIFFCompressionType is under namespace io.

If the set compression mode couldn't apply to the target image, the program itself will switch to Auto Mode.

With the setting AUTO, 1-bit images will be compressed by T6 standard, images with other bit depth will be compressed by LZW.

With the setting JPEG, 1-bit images will be compressed by T6, 8-bit or higher grey images by JPEG standard, and other images by LZW.

T4 and FAX3 are referring to the same compression type.
T6 and FAX4 are also referring to the same compression type.
When JPEG is used, you can use setJPEGQuality() to further reduce the size of the TIFF file.

When an error occurs, check getErrorCode() or getErrorString() for error information.

See also

.io.getTIFFCompressionType()