找到图片框图像的路径 [英] find path of picturebox image

查看:77
本文介绍了找到图片框图像的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Windows窗体中有一个图片框。我将从数据库中检索图像并在picturebox.i中设置该图像想要找到该图片框图像的路径。

I have one picturebox in my windows form.In that i will retrieve image from database & set that image in picturebox.i want to find path of that picturebox image.

推荐答案

如果您的目的仅限于在图片框中显示图像,则不需要任何路径,您只需要创建一个图像实例,其中包含从数据库中检索到的数据,并将其分配给图片框的Image属性。



If your purpose is limited to showing the image in the picturebox you don't need any path, you only need to create one image instance with the data retrieved from the database and assign it to the picturebox's Image property.

byte[] ImageData = <the image="" bytes="">
using (MemoryStream Stream = new MemoryStream( ImageData ))
{
    pictureBox1.Image = Image.FromStream( Stream );
} </the>





V.Lorz



V.Lorz


这篇关于找到图片框图像的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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