本文介绍了流stream =缺少WriteableBitmap.PixelBuffer.AsStream()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写Windows Store应用程序(8.1),并且有示例(可能是针对Win 8.0):
I'm writing windows store app (8.1) and I have sample (probably for win 8.0):
private WriteableBitmap WriteableBitmap;
…
WriteableBitmap = new WriteableBitmap(500,500);
…
using (Stream stream = WriteableBitmap.PixelBuffer.AsStream())
{
…
}
所以我创建了一个新的win 8.1项目,并尝试以相同的方式进行操作,但是当我进入以下位置时:
So I have created new win 8.1 project and trying to do it same way, but when I get to:
using (Stream stream = WriteableBitmap.PixelBuffer.AsStream())
我的项目无法识别 *。AsStream()
方法,谁能告诉我为什么?
My project dont recognize *.AsStream()
method, can anyone tell me why?
推荐答案
using System.Runtime.InteropServices.WindowsRuntime;
这篇关于流stream =缺少WriteableBitmap.PixelBuffer.AsStream()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!