Aspose.Words.Examples.CSharp.Rendering_and_Printing.ImageColorFilters.SaveColorTIFFwithLZW C# (CSharp) Method

SaveColorTIFFwithLZW() private static method

private static SaveColorTIFFwithLZW ( Document doc, string dataDir, float brightness, float contrast ) : void
doc Document
dataDir string
brightness float
contrast float
return void
        private static void SaveColorTIFFwithLZW(Document doc, string dataDir, float brightness, float contrast)
        {
            // Select the TIFF format with 100 dpi.
            ImageSaveOptions imgOpttiff = new ImageSaveOptions(SaveFormat.Tiff);
            imgOpttiff.Resolution = 100;

            // Select fullcolor LZW compression.
            imgOpttiff.TiffCompression = TiffCompression.Lzw;

            // Set brightness and contrast.
            imgOpttiff.ImageBrightness = brightness;
            imgOpttiff.ImageContrast = contrast;

            // Save multipage color TIFF.
            doc.Save(string.Format("{0}{1}", dataDir, "Result Colors.tiff"), imgOpttiff);

            Console.WriteLine("\nDocument converted to TIFF successfully with Colors.\nFile saved at " + dataDir + "Result Colors.tiff");
        }