Create WriteableBitmap in windows phone app 8.1?

吃可爱长大的小学妹 提交于 2019-12-13 07:41:24

问题


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);                  
}

in the above code I am getting error in "BitmapFactory".

it shows below error:

The type or namespace name 'BitmapFactory' does not exist in the namespace 'Windows.UI.Xaml.Media.Imaging' (are you missing an assembly reference?)


回答1:


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!



来源:https://stackoverflow.com/questions/31771517/create-writeablebitmap-in-windows-phone-app-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!