简体   繁体   中英

Create WriteableBitmap in windows phone app 8.1?

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?)

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM