在Windows Phone App 8.1中创建WriteableBitmap? [英] Create WriteableBitmap in windows phone app 8.1?
问题描述
在Windows Phone应用中创建二维码扫描.
iam creating qr code scan in windows phone app.
using (IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read))
{
wrb = await Windows.UI.Xaml.Media.Imaging.BitmapFactory.New(1, 1).FromStream(fileStream);
}
在上面的代码中,"BitmapFactory"中出现错误.
in the above code I am getting error in "BitmapFactory".
它显示以下错误:
类型或名称空间名称'BitmapFactory'在 命名空间"Windows.UI.Xaml.Media.Imaging"(您是否缺少程序集 参考?)
The type or namespace name 'BitmapFactory' does not exist in the namespace 'Windows.UI.Xaml.Media.Imaging' (are you missing an assembly reference?)
推荐答案
您缺少WritableBitmapEx.WinRT.dll
.它位于Sample Projects bin-> Debug Folder中.如果您的参考资料中已经列出了它,请将其删除并再次添加.这样就可以了!
You are missing the WritableBitmapEx.WinRT.dll
. It is located in the Sample Projects bin -> Debug Folder. If it is already listed in your references delete it and add it again. Then it will work!
这篇关于在Windows Phone App 8.1中创建WriteableBitmap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!