Save pictures to an XML file

xiaoxiao2021-03-06  77

In WinForm's resource file, all non-text content such as porturebox image attribute into text saves, which is achieved by serialization, examples:

// use 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 ();

转载请注明原文地址:https://www.9cbs.com/read-94996.html

New Post(0)