Site icon Ryadel

ASP.NET C# Helper Class to merge TIFF files into a single multipage TIFF

Classe ASP.NET C# per il controllo e il calcolo formale del Codice Fiscale

Multipage TIFFs are awesome, aren't them? Well, actually not so much, especially considering the existance of better alternatives such as PDF files. That's precisely why we published a post some months ago explaining how to merge image files of any kind into a single PDF file in ASP.NET C# using the iTextSharp open-source library: if you need a single generic container to store your TIFFs and you can deal with PDFs, we strongly suggest to look no further than that post.

However, there are some specific scenarios where you cannot use PDFs and/or you need to stick to TIFFs. That happened to me some days ago, when I had to re-factor a web service who was serving TIFF files to an old program that could only handle TIFF files.

Since I couldn't use the above PDF-container class, I resorted to code the following helper class, which I'm publishing here hoping that it will help other developers who need to do the same.

That's about it: the comments are quite self-explanatory, hence there's not much to add here.

In case you find this class useful, don't forget to give us a like!

UPDATE: this helper class has been integrated into MergeTIFF, a lightweight .NET Core console application to merge multiple TIFF files into a single multi-page TIF file! For more info, read this post and/or take a look at the MergeTIFF GitHub repository.

 

Exit mobile version