Convert TIFF to JPG image in C#

Convert TIFF to JPG image in C#

In the recent past, we published a blog post on building a JPG/JPEG to TIFF conversion module in a .NET application. In this article, we will learn how to convert TIFF to JPG image in C#. Since this guide is for .NET developers, we will use this TIFF to JPG conversion library written in C# and offer a huge stack of features. So, do not skip any part of this tutorial that will enable you to implement this functionality by writing a few lines of source code in C#.

The following points will be covered in this guide:

TIFF to JPG Conversion - C# Library Installation

This section will demonstrate the installation procedure of this .NET library. So, download the DLL or install this library by running the following command in the NuGet package manager.

Install-Package Aspose.Imaging

Convert TIFF to JPG Image in C#

To implement TIFF to JPG conversion in C#, you may follow the steps mentioned below:

Please follow the steps and the code snippet mentioned below:

  1. Invoke the Image.Load method to load the TIFF image file and assign it to the instance of the TiffImage class.
  2. Loop through the frames of the TIFF image.
  3. Initialize an instance of the JpegOptions class.
  4. Create an object of the ResolutionSetting class to set the resolution for image save options.
  5. Set the resolution unit explicitly by setting the value of the ResolutionUnit property.
  6. Invoke the save method to save the TIFF image to the JPG image format.

Copy & paste the following code into your main file to convert TIFF to JPG image in C#:

The output can be seen in the image below:

TIFF to JPG conversion

Get a Free License

You can get a free temporary license to try the API without evaluation limitations.

Summing up

This brings us to the end of this blog post. I hope you have learned how to convert TIFF to JPG image in C# programmatically. There are many other methods exposed by this TIFF to JPG conversion library. Further, you may visit documentation to get awareness about other features.

Moreover, we suggest you follow our Getting Started guide.

Finally, conholdate.com is writing new blog posts. So, please stay in touch for regular updates.

Ask a question

You can let us know about your questions or queries on our forum.

FAQs

How to Convert TIFF to JPG in C#?

Please follow this link to know about the TIFF to JPG conversion in C#.

See Also