问题
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