如何在Windows Phone应用程序中使用GetPixel功能?

时间:2015-10-20 13:44:36

标签: c# visual-studio-2013 windows-phone-8.1

我无法在Windows Phone应用中使用GetPixel功能。它给了我一个错误:

'System.Windows.Media.Imaging.WriteableBitmap' does not
contain a definition for 'GetPixel' and no extension method 'GetPixel'
accepting a first argument of type
'System.Windows.Media.Imaging.WriteableBitmap' could be found (are you
missing a using directive or an assembly reference?)

1 个答案:

答案 0 :(得分:1)

GetPixel函数是类System.Drawing.Bitmap的成员。而您正在使用System.Media.WriteableBitmap。资料来源:MSDN - Bitmap.GetPixelsWriteableBitmap