Convert Tiff Images to Gif/Jpeg

  • Thread starter Thread starter Pushp
  • Start date Start date
P

Pushp

Hello friends,

Can any body tell me the sample code to convert a Tiff image to a Gif
or Jpeg format. The Resolution of picture is a big concern keeping in
mind.


Hope to get the response from all of you.

Regards,
Pushp
 
Load the file...

Bitmap bm=Bitmap.FromFile("mypic.tiff");

save as jpeg...

bm.Save("mypig.jpg",ImageFormat.JPEG);

Saving to GIF is a variation on the theme.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Hi !

Bob said:
Load the file...

Bitmap bm=Bitmap.FromFile("mypic.tiff");

Shouldn't that read

Bitmap bm = new Bitmap("mypic.tiff");

?
save as jpeg...

bm.Save("mypig.jpg",ImageFormat.JPEG);

But keep in mind that TIFF-files may contain more than one image. Have a
look at Bitmap.SaveAdd.
 
Hello Bob,

Thanks for your response but when I do by this way; some times I lost
the quality of picture and it's originality. I have used a evolution
copy just for a experience the Victor Image Processing Library
Application. This application first convert the TIFF image in to 24Bit
RGB then save as jpg.

So I think we need to use some different algorithm to convert instead
of two direct statement like save as jpg.

Hope you will understand the problem and help me to find out a perfect
solution.

Best of my regards,
Pushp
 
Back
Top