将InkPicture和Ink保存到图像(bmp/jpg) [英] Save InkPicture and Ink to image (bmp/jpg)

查看:209
本文介绍了将InkPicture和Ink保存到图像(bmp/jpg)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经搜索了所有内容,但找不到我需要的答案.我正在尝试一起创建墨水和图片的组合图像.我看过很多示例,但我都不需要.

我有一个墨迹图片,其图像小于墨迹图片的大小.例如,水墨图片的宽度/高度为500x500,但实际图像为200x200.然后将图像居中,以便用户可以在图像周围以及图像上书写.我正在尝试捕获整个墨水图片区域并将其存储.我所见过的所有示例均假定inkpicture.image是需要捕获的尺寸和墨水.在我的情况下不是这样.

我正在使用VS .NET 2003和.NET 1.1框架.这是一个旧版应用程序,因此目前无法进行更新.

感谢您的帮助.

Roger

Hi,
I have searched all over but cannot find an answer for what I need.  I am trying to create a combined image of ink and picture together.  I've seen many examples but none are quite what I need.

I have an inkpicture that has an image that is smaller than the size of the inkpicture.  For example, the inkpicture width/height is 500x500 but the actual image is 200x200.  The image is then centered so that the user can write around the image as well as on the image.  I am trying to capture the entire inkpicture area and store it.  All examples I've seen assume the inkpicture.image is what needs to be captured in terms of size and the ink also.  This is not so in my case.

I'm using VS .NET 2003 and .NET 1.1 framework.  This is a legacy application so updating is not possible at this time.

Thanks for any assistance.

Roger

推荐答案

这是用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(); }


这篇关于将InkPicture和Ink保存到图像(bmp/jpg)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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