如何接收字节的图像转化为实际的图像转换对象? [英] How to convert object which receives image in bytes into actual image?

查看:148
本文介绍了如何接收字节的图像转化为实际的图像转换对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开发C#智能设备应用程序。在我打电话的Web服务。 Web服务方法返回谷歌地图。该方法的返回类型为对象。该对象包含在字节格式的图像。对象conatins在使用Base64Binary格式的图像。我需要在我的应用程序来显示实际图像。我需要什么类型转换做的显示图像。你能为我提供了code或任何一个环节,通过它我可以解决上述问题?

I am developing smart device application in C#. In that I am calling the web services. The web service method return google map. The return type of the method is object. The object contains the image in byte format. The object conatins the image in base64binary format. I need to display the actual image in my application. What type of casting I need to do to display the image. Can you provide me the code or any link through which I can resolve the above issue?

推荐答案

您应该能够把字节[]到MemoryStream创建像下面

You should be able to put the byte[] into a MemoryStream to create the image like below

byte[] yourImage;
MemoryStream ms = new MemoryStream(image);
Image.FromStream(ms);

这篇关于如何接收字节的图像转化为实际的图像转换对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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