Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Please help me...
I want convert tiff type to jpeg and conversely, it. but
the Image.Save method not work in Windows 7 ????
Posted
Updated 5-Aug-12 13:59pm
v3
Comments
[no name] 5-Aug-12 15:26pm    
I have got same problem.
Nikzad.Behrouz 5-Aug-12 21:39pm    
http://stackoverflow.com/questions/2340337/how-can-i-get-net-to-save-this-image/2350569#2350569
[no name] 5-Aug-12 17:17pm    
Help you with what? The code that you posted that describes your problem works perfectly fine on my system.
Sergey Alexandrovich Kryukov 5-Aug-12 17:40pm    
What is "Image"? Exact type, please.
--SA
Nikzad.Behrouz 5-Aug-12 21:43pm    
Picture{tiff, jpeg, ...}

It does actually work. Your vague and meaningless post is hard to decipher, but my best guess is, you're trying to save an image to a path you don't have permission to save to. If you think that's not it, try posting code, telling us where you are saving to, what happens, etc. If it doesn't work, odds are good it's throwning an exception. consider what the message says, because if you do post it, odds are good we will tell you it means what it says.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Aug-12 1:03am    
This assumption was confirmed by clarifications from OP, I added some detail in my answer.
My 5.
--SA
[Answering after clarifications in reply to my comments to the questions:]

This path ("D:\") can be illegal on Windows 7. You can edit permissions for this directory, but it cannot make your code valid. If you execute it on some computer, how can you know that "D:" even exists? (On one of my computers, even "C:" does not exist; it's not a must.)

Generally, there are no cases where hard-coded file path can be useful. In all cases, it should be calculated during run time out of user-supplied data, data from configuration, assembly location, "special folders", per user or for "all users", so you can use System.Environment.GetFolderPath(Environment.SpecialFolder), please see:
http://msdn.microsoft.com/en-us/library/system.environment.getfolderpath.aspx[^],
http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx[^].

—SA
 
Share this answer
 
Hi Sergy Alexandrovich
Please explain more with example code;
thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900