• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

converting file formats

I need to convert a tiff file into a jpg file. How do I do that?
Thanks!
0
jinene
Asked:
jinene
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
mokuleCommented:
You mean to write a program or use a tool.
If a tool - IrfanView can be good
0
 
mokuleCommented:
You can download it from
http://www.irfanview.com/
0
 
glaZer_softwareCommented:
not enough points for a source code
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
eric_duncanCommented:
It's really very simple:

using System;
using System.Drawing;

// this method will convert any image, tiff or not, to a jpeg
public void ConvertImageToJpeg(string strFileName, string strOutFileName){
        // the following two lines of code were lifted
        // from the codeproject link referenced below.
        Image imgInFile=Image.FromFile(strFileName);
        imgInFile.Save(strOutFileName,ImageFormat.Tiff);
}

Check out the following link:

http://www.codeproject.com/csharp/dotnet_convertimage.asp

Let me know if this helps!

Eric

PS. I don't want to start a flame war, but the fact that you have come here looking for help is reason enough for me to give you source code. Points are cool, but they're absolutely secondary IMHO.
0
 
eric_duncanCommented:
Sorry, forgot to mention that the above code is written in C# using .Net framework 1.1.
0
 
Melih SARICACommented:
Easiest way ...

use GDI+ Functions..
very easy and Fast ..

which language r u using ?
0
 
Melih SARICACommented:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawing.asp

this link ll help u about GDI+

hope it helps..

thx 4 the points
0
 
eric_duncanCommented:
Yes, I agree that GDI+ is absolutely the way to go - the code sample I provided in c# above is using the System.Drawing namespace in .Net, which is an encapsulation of the GDI+ functionality. Actually, I think that non_zero's link above goes directly to the MSDN documentation for this namespace, so it looks like we're on the same page.

Eric
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now