C# TIFF Image Library
Convert Raster Images to TIFF in C#.NET


C# Demo to Convert and Render JPEG/Png/Bmp to Tiff in Visual C#.NET Project



C#.NET Image: Raster Images to TIFF Overview



To help C# developers to transform & convert various image forms, like Jpeg, Png, Bmp, and REImage object to single or multi-page Tiff image file with no loss in content quality. RasterEdge develops a C#.NET Tiff file converter control, XDoc.Tiff for .NET, which can be stably integrated into C#.NET developing projects, like ASP.NET web applications and .NET Windows Forms applications.



Use C# Code to Convert Jpeg to Tiff



Firstly, you may use following C# sample code to transform Jpeg image to Tiff image in your .NET application.



            String[] imagePaths = { @"F:\demo1.jpg", @"F:\demo2.jpg", @"F:\demo3.jpg" };
            Bitmap[] bmps = new Bitmap[3];
            // Step1: Load the image
            for (int i = 0; i < imagePaths.Length; i++)
            {
                Bitmap tmpBmp = new Bitmap(imagePaths[i]);
                if (tmpBmp != null)
                    bmps[i] = tmpBmp;
            }
            // Step2: Construct TIFFDocument object.
            TIFFDocument tifDoc = new TIFFDocument(bmps);
            // Step3: Other operations, like saving it.
            if (tifDoc == null)
                throw new Exception("Fail to construct TIFF Document");
            tifDoc.Save(@"F:\Test.tif");


Use C# Code to Convert Bmp to Tiff with specified compression type



The output TIFF file will be compressed by CCITT Group 3 Fax compression



            String[] imagePaths = { @"F:\demo1.bmp", @"F:\demo2.bmp", @"F:\demo3.bmp" };
            Bitmap[] bmps = new Bitmap[3];
            // Step1: Load the image
            for (int i = 0; i < imagePaths.Length; i++)
            {
                Bitmap tmpBmp = new Bitmap(imagePaths[i]);
                if (tmpBmp != null)
                    bmps[i] = tmpBmp;
            }
            // Step2: Construct TIFFDocument object.
            TIFFDocument tifDoc = new TIFFDocument(bmps,ImageCompress.Group3Fax);
            // Step3: Other operations, like saving it.
            if (tifDoc == null)
                throw new Exception("Fail to construct TIFF Document");
            tifDoc.Save(@"F:\Test.tif");


Use C# Code to Convert Bmp to Tiff with optional settings



The output TIFF will be 1.5 times the size of input image



            String[] imagePaths = { @"F:\demo1.bmp", @"F:\demo2.bmp", @"F:\demo3.bmp" };
            Bitmap[] bmps = new Bitmap[3];
            // Step1: Load the image
            for (int i = 0; i < imagePaths.Length; i++)
            {
                Bitmap tmpBmp = new Bitmap(imagePaths[i]);
                if (tmpBmp != null)
                    bmps[i] = tmpBmp;
            }
            // Step2: Create the ImageOutputOption object.
            ImageOutputOption option = new ImageOutputOption();
            //set the zoom value
            option.Zoom = 1.5f;
            // Step3: Construct TIFFDocument object.
            TIFFDocument tifDoc = new TIFFDocument(bmps, option);
            // Step4: Other operations, like saving it.
            if (tifDoc == null)
                throw new Exception("Fail to construct TIFF Document");
            tifDoc.Save(@"F:\Test.tif");








Common Asked Questions

Can you convert BMP to TIFF?

Microsoft Windows pre-installed applications support converting bitmap (.bmp) images to multi-page TIFF file. You can also use RasterEdge XDoc.TIFF C# library to build a WinForms or WPF Windows application to batch convert BMP to TIFF without any cost.

Is TIFF or BMP better quality?

Both bmp and tiff support high quality images. TIFF file is usually used for printing projects, and TIFF image format supports various color models and compression options. XDoc.TIFF C# library supports TIFF image creating, converting, extracting text content in various .NET projects, such as ASP.NET Core, MVC, Blazor, Windows Form, WPF web and desktop applications.