开发者

Sending Image from silverlight to WCF service

开发者 https://www.devze.com 2023-02-19 06:28 出处:网络
I need to Send Image from silverlight to WCF service. I try to do 开发者_如何学运维it by converting the object WriteableBitmap to byte[] - but the WCF does not have the ability to use WriteableBitmap

I need to Send Image from silverlight to WCF service.

I try to do 开发者_如何学运维it by converting the object WriteableBitmap to byte[] - but the WCF does not have the ability to use WriteableBitmap object ( try to fine the using System.Windows.Media.Imaging but this is not possible )

Is there is some other way to do it ? Is there is some Image object that exist in silverlight that can be convert to byte[] and can be use also on the WCF server ?


You could use the WriteableBitmap. Create it by passing the original BitmapSource to the constructor and then use the Pixels property to get to the bytes.

0

精彩评论

暂无评论...
验证码 换一张
取 消