TIFF File Page Processing SDK Library in C#.NET

Comprehensive and Robust C# Codes to Process TIFF Document Page
Yiigo.Image for .NET provides high performance TIFF reading, processing and converting SDK library in C#.NET for users. TIFF processing C# add-on enables users to read single page or multi-page TIFF image file with thumbnail-based preview. TIFF processor C# add-on allows user to insert, rotate, reorder, merge and split TIFF file(s) or TIFF image pages with robust C# APIs. Its C# TIFF converting method supports converting TIFF to other image formats or document types such as BMP, PNG, JPEG, Word and PDF. In this article, we will give you a comprehensive introduction on our TIFF processor add-on in C#.NET. We also provide a detailed TIFF manipulating VB.NET tutorial in our website, please have a look if you are a VB.NET programmer.
This TIFF processing SDK can be integrated into other C# TIFF file application to perform functions listed below. Or you can directly use our C#.NET windows TIFF viewer, C#.NET web TIFF viewer or C#.NET mobile TIFF viewer to process your TIFF image files with friendly user interface.
It is easy for you to load TIFF file from local folder or http server and save edited TIFF images with our C# TIFF processing control. The following tutorial demonstrates functionalities of TIFF processing SDK in C# from several sections listed below.
  • How to rotate TIFF file page with C# sample codes
  • How to split and merge TIFF file(s) with C# sample codes
  • How to insert, sort and delete TIFF page(s) with C# sample codes
  • How to add a new image to TIFF file page with C# sample codes
  • Other functions of TIFF file processing control in C#.NET
Rotate TIFF File Page in C#.NET
Yiigo C# TIFF processing SDK component allows users to batch rotate TIFF page from 0 to 360 degrees by configuring the C# codes listed below. You can define which tiff page to rotate. For example, you can rotate page 3 or page 5. You can also rotate from page 3 to page 5. After rotating, you can save rotated TIFF file into various image formats and document types.
public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName = FolderName + "ygdemo.tif";

YGDocument doc = YGFile.OpenDocFile(fileName, new TIFReader());

BasePage aPage = doc.GetPage(3);

YGImage ygImage = (YGImage)aPage.ToImage();

YGFile.SaveImageFile(ygImage, "c:/ygimage1.bmp", new BMPCreator());

YGImage ygImage1 = YGFile.OpenImageFile("c:/ygimage1.bmp");

ImageProcessing.ApplyRotate(ygImage1, 100);

YGFile.SaveImageFile(ygImage1, "c:/rotate-ygimage.bmp", new BMPCreator());
}
Split & Merge TIFF File(s) in C#.NET
TIFF processing SDK library in C# help users to split and merge TIFF document(s). Yiigo provides comprehensive and reliable methods for users to merge two or more TIFF files into one TIFF document or split TIFF document into two or more TIFF files. You can customize parameters with the following TIFF file merging and splitting C# codes.
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName1 = FolderName + "ygdemo1.tif";
string fileName2 = FolderName + "ygdemo2.tif";
string fileNameCombined = FolderName + "ygmerge.tif";

YGDocument doc1 = YGFile.OpenDocFile(fileName1, new TIFReader());

YGDocument doc2 = YGFile.OpenDocFile(fileName2, new TIFReader());

BaseDocument docCombined = doc1.CombineDoc(doc2);

YGFile.SaveDocumentFile((YGDocument)docCombined, fileNameCombined, new TIFCreator());

}
}
}
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName = FolderName + "ygdemo.tif";

YGDocument doc = YGFile.OpenDocFile(fileName, new TIFReader());

List<BaseDocument> baseDocs = doc.SplitDocument(1);

int index = 0;

foreach (BaseDocument baseDoc in baseDocs)
{
// YGImage ygimage = (YGImage)baseDoc.GetPage(0).ToImage();
index++;

YGFile.SaveDocFile((YGDocument)baseDoc, "c:/ygdoc" + index + ".tif", new TIFCreator());
}
}
}
}
Insert, Sort and Delete TIFF Page(s) in C#.NET
TIFF processing SDK .NET add-on enables you to insert a new TIFF page, sort order of TIFF pages and delete useless TIFF page in C# class application. This easy-to-use TIFF page processing add-on is a professional and flexible page processing toolkit. You can add a new page behind page 1, page 2 or any other TIFF page. You can delete any specified page form TIFF document. You can change the position of any two or more TIFF pages or reorder the whole TIFF document. Here I take tiff page sorting function as an example.
public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName = FolderName + "ygdemo.tif";

YGDocument doc = YGFile.OpenDocFile(fileName, new TIFReader());

int pageCount = doc.GetPageCount();

List<int> newOrders = new List<int>();

for (int i = pageCount - 1; i >= 0; i--)
{
newOrders.Insert(i);
}

doc.SortPage(newOrders);

YGFile.SaveDocFile(doc, "c://yg-sort.tif", new TIFCreator());
}
Add a New Image to TIFF Page in C#.NET
TIFF processing SDK toolkit in C#.NET allows users to add a new image in any image formats to the TIFF document page. You can rotate, convert, compress and resize embed images within TIFF document. The C# codes below use BMP image as an example, please have a look.
public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{


string fileName = FolderName + "Sample.tif";

YGDocument doc = YGFile.OpenDocFile(fileName, new TIFReader());

BasePage aPage = doc.GetPage(3);

string fileName = "c:/ygdemo.bmp";

YGImage ygImage = YGFile.OpenImageFile(fileName);


Yiigo.Imaging.Drawing.YGIsertimage item = obj.IsertimageItem(newPage);
newPage.InsertimageItem(item);

newPage.CombineItemsToPage();


YGFile.SaveDocumentFile(doc, "c://yg-insert.tif", new TIFCreator());
}
Other TIFF Processing Functions in C#.NET
Apart from above mentioned TIFF processing features, Yiigo also offers other functionalities such as watermarking, cropping, annotating and adding antique effects on TIFF image page in Visual Studio C# project. We are also constantly updating new TIFF processing functions for users. If you have any other questions, please send an email to us.
More Related TIFF Processing Tutorial in C#.NET
Imaging Solution
Yiigo.Image for .NET
Online C# Tutorial
C#: Yiigo.Image for .NETC#: How to StartC#: Doc Management SolutionC#: Web Doc ViewerC#: How to Deploy SDK
Doc & Image Formats
C#: PDFC#: TIFFC#: Create, Load, Save TIFFC#: TIFF Doc ViewerC#: Web TIFF ViewerC#: Windows TIFF ViewerC#: Mobile TIFF ViewerC#: Annotate TIFFC#: Convert TIFFC#: Convert TIFF to BMPC#: Convert TIFF to GIFC#: Convert TIFF to JPEGC#: Convert TIFF to PDFC#: Convert TIFF to PNGC#: Compress TIFF ImageC#: Read & Write TIFF Tag
C#: Process TIFF
C#: Rotate TIFF PageC#: Add TIFF PageC#: Add Image to TIFF PageC#: Delete TIFF PageC#: Sort TIFF PagesC#: Merge TIFF DocumentsC#: Split TIFF DocumentC#: Read TIFF BarcodeC#: Generate TIFF BarcodeC#: Draw on TIFFC#: Draw TIFF WatermarkC#: WordC#: DICOM
Advanced Functions
C#: Programming with Image SDKC#: Barcode ReadingC#: Barcode GeneratingC#: Twain ScanningC#: OCR Recognition