TiffCompression enumeration
TiffCompression enumeration
Specifies what type of compression to apply when saving page images into a TIFF file.
Members
Name | Description |
---|---|
NONE | Specifies no compression. |
RLE | Specifies the RLE compression scheme. |
LZW | Specifies the LZW compression scheme. In Java emulated by Deflate (Zip) compression. |
CCITT3 | Specifies the CCITT3 compression scheme. |
CCITT4 | Specifies the CCITT4 compression scheme. |
Examples
Shows how to select the compression scheme to apply to a document that we convert into a TIFF image.
doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
builder.insert_image(file_name=IMAGE_DIR + 'Logo.jpg')
# Create an "ImageSaveOptions" object which we can pass to the document's "Save" method
# to modify the way in which that method renders the document into an image.
options = aw.saving.ImageSaveOptions(aw.SaveFormat.TIFF)
# Set the "TiffCompression" property to "TiffCompression.None" to apply no compression while saving,
# which may result in a very large output file.
# Set the "TiffCompression" property to "TiffCompression.Rle" to apply RLE compression
# Set the "TiffCompression" property to "TiffCompression.Lzw" to apply LZW compression.
# Set the "TiffCompression" property to "TiffCompression.Ccitt3" to apply CCITT3 compression.
# Set the "TiffCompression" property to "TiffCompression.Ccitt4" to apply CCITT4 compression.
options.tiff_compression = tiff_compression
doc.save(file_name=ARTIFACTS_DIR + 'ImageSaveOptions.TiffImageCompression.tiff', save_options=options)
See Also
- module aspose.words.saving