asp.net C#转换FILESTREAM图像 [英] asp.net c# convert filestream to image

查看:752
本文介绍了asp.net C#转换FILESTREAM图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我试着去转换成图像文件流。我有以下code

i have a filestream which im trying to convert into a image. i have the following code

FileStream imageFile = image["file"] as FileStream;

图像是图像在地图上保持的信息。请能有人告诉我,我应该下一步该怎么做。

image is a map holding information on the image. please can some one direct me on what I should do next.

推荐答案

Image.FromStream 将采取流,并返回一个图像。顺便说一句,如果你使用 Bitmap.FromStream Image.FromStream ,或任何这些方法,它们都返回位图,所以他们都可以上溯造型到位图图片如果你想让他们。

Image.FromStream will take a stream and return an image. Incidentally, if you use Bitmap.FromStream or Image.FromStream, or indeed any of these methods, they all return a Bitmap, so they can all be upcast to Bitmap from Image if you want them to be.

这篇关于asp.net C#转换FILESTREAM图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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