How to C#: Tiff
Using Tiff SDK for C#.NET
Tiff Compress
  |  
Home ›› XDoc.Tiff ›› C# Tiff: Compress Tiff

C# TIFF - Compress TIFF Files in C#.NET


C# .NET APIs and Sample Codes for How to Compress TIFF Document






C#.NET: Compress TIFF Files Overview



RasterEdge XDoc.Tiff for .NET utilizes the most advanced and standard based Tiff image and document compression methods, which guarantee C# users with high quality loss and lossless Tiff document compression. vb.net add text to pdf, convert pdf to word c#, how to read specific text from pdf file in c#, convert pdf to tiff c#, generate pdf azure function, c# wpf preview pdf. This C#.NET Tiff compressing SDK provides several industry standards and alternative compression options & technologies to compress Tiff image file, including Fax, Group4, JPEG, RLE(CCITT modified Huffman RLE), Zip, LZW, and Deflate.


Related .net document control helps:
asp.net pdf editor control: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net edit pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net excel web viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net tiff viewer control: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net annotate pdf: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net document viewer c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...


This page mainly talks about Tiff image compression and specifically speaking, we support following two kinds of interfaces for Tiff document compression no matter for C# Windows project or C# ASP.NET web program. convert pptx to pdf c#, c# itextsharp convert pdf to image, c# itextsharp preview pdf, c# print to pdf, how to make pdf password protected in c#, c# split pdf, itextsharp tiff to pdf vb.net.


When you create a TIFFPage with an image source, you can choose the type of image compression you want to use


When you create a new TIFFDocument with a collection of image source, you can specify one compression mode for all images or different modes for each




C# Demo Code for TIFF File Compression



Add references;


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.XDoc.Processing.dll


  RasterEdge.Imaging.Raster.dll


  RasterEdge.Imaging.Raster.Core.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.TIFF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.TIFF;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:


If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.


If using x86, the platform target should be x86.


In this part, users can find a complete C# sample code for the second type of Tiff compression. All pages using the same compression mode RLE(CCITT modified Huffman RLE).




// Define Jpeg images list.
            string[] imagePaths = { @"C:\demo1.jpg", @"C:\demo2.jpg", @"C:\demo3.jpg" };

            // Construct List<REImage> object.
            List<Bitmap> images = new List<Bitmap>();

            // Step1: Load image to REImage object.
            foreach (string file in imagePaths)
            {
                Bitmap tmpBitmap = new Bitmap(file);
                if (null != tmpBitmap)
                    images.Add(tmpBitmap);
            }

            // Step2: Construct TIFFDocument object and set page compression.
            TIFFDocument doc = new TIFFDocument(images.ToArray(), ImageCompress.CCITT1D);
            if (null == doc)
                throw new Exception("Fail to construct TIFF Document");

            // Step3: Other operations, like saving it.
            doc.Save(@"C:\output.tif");



public TIFFDocument(Bitmap[] images, ImageCompress imageCompression)

Description:
Create TIFF file from images with specified compression.

Parameters:
public TIFFDocument(Bitmap[] images, ImageOutputOption options)

Description:
Create TIFF file from images with option setting.

Parameters:
ImageOutputOption: