TIFF to GIF Converting Component in C#.NET

A Comprehensive Guidance on How to Convert TIFF to GIF in C#
Yiigo.Image for .NET graphic converter renders TIFF images to other image formats, including TIFF to GIF, TIFF to PNG, TIFF to BMP, TIFF to JPEG and so on. This TIFF to GIF conversion tool using C# codes programmed in Visual Studio is a compact and professional image converting library. With this TIFF to GIF C# conversion toolkit, you can quickly batch convert hundreds of TIFF images to GIF in a few secondes. The TIFF to GIF converting tutorial demonstrates from the following several aspects.
  • A brief introduction on GIF format in C# application
  • The reason to convert TIFF to GIF with C# TIFF to GIF converter
  • How to convert TIFF to GIF in a few steps in C#.NET
C#.NET - What is GIF
The Graphics Interchange Format, well known as GIF, is a bitmap image format widely used in the World Wide Web. GIF format is first introduced by CompuServe in 1987. This format supports up to 8 bits per pixel with a table of up to 256 various colors from the 24-bit RGB color space. Because of GIF's limitation in the color palette, it is very suitable for simpler images such as graphics or logos with a limited number of colors, not so suitable for color photographs. You can use C#.NET TIFF to GIF converter component to convert images without losing image color.
GIF is a lossless image format using LZW compresson (one efficient method to compress image). GIF image size will be reduced without significant quality loss during compression. GIF achieves two kinds of compression. one way is to reduce the number of colors of color-rich image. In this way, the number of bits in every pixels are reduced. The other way is to replace repeated occurring colors with a short abbreviation. In addition to LZW compression, Yiigo also provides C#.NET JPEG2000 and C#.NET JBIG2 compression solution for users and developers.
Why Convert TIFF to GIF in C#.NET
TIFF is a lossless image format with a wide range of color depths and bit depths for storing digital images. GIF is commonly used in web sites suited for sharp-edged line art and used for small animations. Even though they both support lossless compression method, TIFF requires more file size than GIF. And GIF is a better image format applied in web sites. So Yiigo devotes itself to develop a TIFF converter using C# codes to convert TIFF to GIF and other image formats.
Yiigo TIFF to GIF C# converter control enables you to batch convert TIFF to high visual quality GIF format. Besides converting function, you can use this TIFF converting tool to resize, crop, rotate, flip and watermark pictures without installing another plug-in. With the help of Yiigo TIFF to GIF converter in C#.NET, TIFF converting is absolutely a piece of cake for you.
TIFF to GIF Conversion Steps in C#.NET
The following tutorial demonstrates how to convert TIFF to GIF with C# Yiigo conversion tool in a few steps. You can either convert TIFF to GIF with a command line in C# or create a TIFF converter with default settings. Here I take TIFF converter interface as an example to demonstrate how to convert TIFF to GIF fluently. Please read the following TIFF to GIF converting steps. You can also find sample codes in the codatab below.
  • First, open TIFF to GIF converter and then click the "Add" button to add your TIFF format image into the converter. The loaded images will be presented in the thumbnail preview in the left of the C# TIFF converter.
  • Second, choose the format you want to convert to. If you prepare to convert TIFF to GIF in C# application, you should click GIF in the converting format list. You can also save TIFF to GIF images to make animated GIF. At the same time, you can resize, crop, flip, watermark images before converting TIFF images.
  • Third, click the "Browser" button to choose a folder and click the "convert" button to start the conversion process. After converting, you can open the folder to use the new images of GIF format in whatever way you desire to.
public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{


string fileName = FolderName + "Sample.tif";

YGDocument doc = YGFile.OpenDocumentFile(fileName, new TIFDecoder());//use TIFDecoder open a tif file

int pageCount = doc.GetPageCount();//get tif's page count

for (int pgIdx = 0; pgIdx < pageCount; pgIdx++)
{
BasePage aPage = doc.GetPage(pgIdx);//get page from YGDocument


try
{
YGImage img = (YGImage)aPage.ToImage();//translate page to image
YGFile.SaveImageFile(img, FolderName + "output" + pgIdx + ".gif");//save image to gif image file
}
catch (Exception)
{
Debug.WriteLine("Fail to display page " + pgIdx);
}
}
}
Yiigo.Image for C#
Yiigo.Image Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner