且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将InkPicture和Ink保存到图像(bmp/jpg)

更新时间:2022-11-17 12:26:12

这是用VS2005写的,不确定是否会帮助....if(pic.Ink.Strokes.Count> 0){byte [] sig; sig = pic.Ink.Save(Microsoft.Ink.PersistenceFormat.Gif,Microsoft.Ink.CompressionMode.Maximum); System.IO.MemoryStream imgToStore =新的System.IO.MemoryStream(sig); 图片img1 = Image.FromStream(imgToStore); img1.Save("c:\ mypic.jpg",System.Drawing.Imaging.ImageFormat.Jpeg); img1.Dispose(); }
This is written in VS2005, not sure if it will help.... if (pic.Ink.Strokes.Count > 0) { byte[] sig; sig = pic.Ink.Save(Microsoft.Ink.PersistenceFormat.Gif,Microsoft.Ink.CompressionMode.Maximum); System.IO.MemoryStream imgToStore = new System.IO.MemoryStream(sig); Image img1= Image.FromStream(imgToStore); img1.Save("c:\mypic.jpg",System.Drawing.Imaging.ImageFormat.Jpeg); img1.Dispose(); }