转换System.Web.UI.WebControls.Image转换为System.Drawing.Image? [英] Converting System.Web.UI.WebControls.Image to System.Drawing.Image?

查看:789
本文介绍了转换System.Web.UI.WebControls.Image转换为System.Drawing.Image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法将其转换。 ?任何帮助。

I can't seem to convert it. Any help?

推荐答案

这是两个完全不同的对象:

They are two completely different objects:


  • System.Web.UI.WebControls.Image 是具有呈现HTML,这将使得浏览器下载和显示图像任命的能力控制

  • 为System.Drawing.Image 是具有将图像加载到内存中以便操纵它,或者以显示它的能力的类在控制(但不是Web图像控制)。

  • System.Web.UI.WebControls.Image is a control that has the ability to render HTML which will make the browser download and display an appointed image
  • System.Drawing.Image is a class that has the ability to load an image into memory for manipulating it, or to display it in a control (but not the web image control).

因此,不幸的是没有办法,你可以转换 System.Web.UI.WebControls.Image 为System.Drawing.Image ;它甚至不碰的图像数据。

So unfortunately there is no way you can convert a System.Web.UI.WebControls.Image to a System.Drawing.Image; it doesn't even touch the image data.

这篇关于转换System.Web.UI.WebControls.Image转换为System.Drawing.Image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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