使用Stream writer编写图像 [英] Using Stream writer to write images

查看:142
本文介绍了使用Stream writer编写图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们

有没有办法将图像流写入文件?

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 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.


这篇关于使用Stream writer编写图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆