Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys

Is there a way to streamwrite an image to a file?
Posted

Quote:
http://www.dotnetperls.com/streamwriter


http://www.dotnetperls.com/file


http://csharpdotnetfreak.blogspot.com/2009/06/read-write-word-filestream-streamwriter.html

http://www.mstecharticles.com/2011/01/stream-reader-stream-writer-and.html

http://codecandle.com/codedetail.aspx?id=147

http://www.daniweb.com/software-development/csharp/threads/344091
 
Share this answer
 
Comments
Anele Ngqandu 24-Jan-12 3:56am    
Hi Sir...I dont want to write text to a file but I want to have an image in my file.
Use the BinaryWriter class instead.

And, why do you want to use StreamWriter?

You can just use the File.Copy(srcFileName, destFileName) method if you get the image through a path, or Image.Save(destFileName) method if you are using the Image class.

Using streams "might" affect the image quality or "might" need a greater resource, thus reducing the performance of your application.
 
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