Solved

converting file formats

Posted on 2004-03-28
10
282 Views
Last Modified: 2010-04-17
I need to convert a tiff file into a jpg file. How do I do that?
Thanks!
0
Comment
Question by:jinene
  • 3
  • 2
  • 2
  • +1
10 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 10699939
You mean to write a program or use a tool.
If a tool - IrfanView can be good
0
 
LVL 17

Accepted Solution

by:
mokule earned 43 total points
ID: 10699961
You can download it from
http://www.irfanview.com/
0
 

Expert Comment

by:glaZer_software
ID: 10700040
not enough points for a source code
0
 
LVL 2

Assisted Solution

by:eric_duncan
eric_duncan earned 41 total points
ID: 10701069
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:eric_duncan
ID: 10701089
Sorry, forgot to mention that the above code is written in C# using .Net framework 1.1.
0
 
LVL 19

Assisted Solution

by:Melih SARICA
Melih SARICA earned 41 total points
ID: 10702453
Easiest way ...

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

which language r u using ?
0
 
LVL 19

Expert Comment

by:Melih SARICA
ID: 10702460
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
 
LVL 2

Expert Comment

by:eric_duncan
ID: 10703261
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now