我阅读了"Byte to BitmapImage“的所有第一页结果,并找到了 ,问题是我的代码不适合我,我得到了这个错误:
'System.Windows.Media.Imaging.BitmapImage‘不包含'SetSource’的定义,也找不到接受'System.Windows.Media.Imaging.BitmapImage‘类型的第一个参数的扩展方法'SetSource
如何在silverlight4应用程序中将BitmapImage转换为Byte[]我在.xap文件中有一个图像文件。BitmapImage bi = new BitmapImage(new Uri("images/GRed.png", UriKind.Relative));
现在我想将BitmapImage转换成Byte[],并以二进制格式保存到db中。
如何将WriteableBitmap转换为Silverlight5中的BitmapImage对象?到目前为止,这里是我将WriteableBitmap转换为BitmapImage的尝试;但是,它不起作用。如果没有异常抛出,则生成的BitmapImage只是一个没有数据的“空”对象;PixelHeight和PixelWidth都是零:
public BitmapImage Convert(WriteableBitmap
我想取一个BitmapImage并将其发布到服务器上的PHP页面。然后,该页面在服务器上为我创建一个.jpg文件。// We need to resize the images before uploadingthe web
[NSURLConnection sendSynchronousRequest:
我从一个128x128的双精度数组开始,然后把它变成一个一维的字节数组,每个双精度数组的值都是成比例的。然后,我将这个字节数组转换为内存流(下面的dataStream),并尝试将其放入BitmapImage中,如下所示:imgScan.Height = 128;BitmapImage bi = new BitmapImage();
bi.SourceRect = new Int32Rect(0, 0, wid