Enum TiffCompression

TiffCompression enumeration

Specifies what type of compression to use when saving a document to the TIFF format.

public enum TiffCompression

Values

NameValueDescription
None1Specifies no compression.
Rle2Specifies RLE compression.
Ccitt33Specifies CCITT Group 3 fax encoding.
Ccitt44Specifies CCITT Group 4 fax encoding.
Lzw5Specifies LZW compression.
PackBits32773Specifies Macintosh RLE compression.
Jpeg7Specifies JPEG DCT compression compression.

Examples

Shows how to save a document as image in Tiff format using PackBits compression.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

// Load the document into Aspose.Note.
Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));

var dst = Path.Combine(dataDir, "SaveToTiffUsingPackBitsCompression.tiff");

// Save the document.
oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
                      {
                          TiffCompression = TiffCompression.PackBits
                      });

Shows how to save a document as image in Tiff format using Jpeg compression.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

// Load the document into Aspose.Note.
Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));

var dst = Path.Combine(dataDir, "SaveToTiffUsingJpegCompression.tiff");

// Save the document.
oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
                      {
                          TiffCompression = TiffCompression.Jpeg,
                          Quality = 93
                      });

Shows how to save a document as image in Tiff format using CCITT Group 3 fax compression.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

// Load the document into Aspose.Note.
Document oneFile = new Document(Path.Combine(dataDir, "Aspose.one"));

var dst = Path.Combine(dataDir, "SaveToTiffUsingCcitt3Compression.tiff");

// Save the document.
oneFile.Save(dst, new ImageSaveOptions(SaveFormat.Tiff)
                      {
                          ColorMode = ColorMode.BlackAndWhite,
                          TiffCompression = TiffCompression.Ccitt3
                      });

See Also