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.
精彩评论