使用Stream writer编写图像 [英] Using Stream writer to write images
问题描述
伙计们
有没有办法将图像流写入文件?
Hi Guys
Is there a way to streamwrite an image to a file?
推荐答案
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
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
http://stackoverflow .com/questions/1082055/write-wpf-output-to-image-file [
请改用BinaryWriter
类.
而且,为什么要使用StreamWriter
?
如果通过路径获取图像,则只能使用File.Copy(srcFileName, destFileName)
方法,如果使用的是Image
类,则可以使用Image.Save(destFileName)
方法.
使用流可能"影响图像质量,或者使用可能"流需要更多资源,从而降低了应用程序的性能.Use theBinaryWriter
class instead.
And, why do you want to useStreamWriter
?
You can just use theFile.Copy(srcFileName, destFileName)
method if you get the image through a path, orImage.Save(destFileName)
method if you are using theImage
class.
Using streams "might" affect the image quality or "might" need a greater resource, thus reducing the performance of your application.
这篇关于使用Stream writer编写图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!