将图像存储在c#中的变量中 [英] store image in a variable in c#

查看:107
本文介绍了将图像存储在c#中的变量中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将特定图像存储在c#中的变量中。我可以存储以及我应该使用哪种数据类型。我宣布图像为休耕



< asp:图片ID =Image1runat =serverHeight =72pxImageUrl =images / image4.jpeg />

i希望将Image1存储在变量中以访问代码中的那个

i want to store particular image in a variable in c# .how can i store and which data type i should use. i declare image as fallows

<asp:Image ID="Image1" runat="server" Height="72px" ImageUrl="images/image4.jpeg" />
i want to store Image1 in a variable to access that one in code behind

推荐答案

Image将是Bitmap类型。除非你编写了一个HTTP处理程序来为它服务,否则它对你没用。您的浏览器只能通过网址查看图片。
The Image would be of type Bitmap. And it would be useless to you, unless you wrote a HTTP handler to serve it. Your browser can only see images via a URL.


这篇关于将图像存储在c#中的变量中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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