我如何将图像形式的sqlserver获取到Inkpicture [英] how can i get the image form sqlserver to Inkpicture

查看:183
本文介绍了我如何将图像形式的sqlserver获取到Inkpicture的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我已经将图像存储在sqlserver中,就像

hi guys i have stored the the image in sqlserver like

byte[] isf = inkPicture1.Ink.Save(Microsoft.Ink.PersistenceFormat.InkSerializedFormat);
InkCollector ic = new InkCollector();
ic.Ink.Load(isf);
ic.Renderer.Scale(0.5f, 0.5f);
inkPicture1.InkEnabled = false;
inkPicture1.Ink = ic.Ink;
byte[] inkBytes = inkPicture1.Ink.Save(PersistenceFormat.Gif);

我可能知道如何在.net窗口中将图像转换为inkpicture在c#....
中形成表格
谢谢...

may i know how can i get the image into inkpicture in the .net window form in c#....

thanks...

推荐答案

可以简单地使用 ^ ]以从数据库中读取数据,例如使用 ^ ]属性,将其强制转换为byte array并使用加载 [ ^ ]来填充墨水
Can you simply use a SqlDataReader[^] to read the data from the database, get the correct column data for example with Item[^] property, cast it to byte array and use Load[^] to populate the Ink


这篇关于我如何将图像形式的sqlserver获取到Inkpicture的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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