Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert different picture formats (jpg, gif, png, etc.) to TIFF format

Tags:

I am working on reading text from an image through OCR. It only supports TIFF format images.

So, I need to convert other formats to TIFF format. Can it be done? Please help by providing some references.

like image 515
user1509 Avatar asked Aug 07 '12 06:08

user1509


People also ask

What kind of file formats are .GIF .JPG .PNG and TIF?

While PNG, GIF, TIFF, and JPEG files are all raster formats, understanding the difference between raster and vector graphics will likely influence what file format to choose for your projects.

Can you convert a JPG to a TIFF?

Convert JPG format files to TIFF in a few simple steps. A resolution of 300 dpi or more is required for printing. Choose File and select Save As. Select the TIFF format and click Save. for the output file you want.


1 Answers

If you create an Image object in .NET, you can save it as a TIFF. It is one of the many ImageFormat choices at your disposal.

Example:

var png = Image.FromFile("some.png");
png.Save("a.tiff", ImageFormat.Tiff);

You'll need to include the System.Drawing assembly in your project. That assembly will give you a lot of image manipulation capabilities. Hope that helps.

like image 197
Jacob Avatar answered Sep 22 '22 12:09

Jacob