??????----www.fawcette.com/china: "将图片保存到一个XML文件
罗会涛
WinForm的资源文件中,将PictureBox的Image属性等非文字内容都转变成文本保存,这是通过序列化(Serialization)实现的,例子:
//using System.Runtime.Serialization.Formatters.Soap;
Stream stream = new FileStream('E:\\Image.xml',FileMode.Create,FileAccess.Write,FileShare.None);
SoapFormatter f = new SoapFormatter();
Image img = Image.FromFile('E:\\Image.bmp');
f.Serialize(stream,img);
stream.Close();"
Monday, May 31, 2004
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment