【问题标题】:How to use the GetPixel function in a Windows Phone App?如何在 Windows Phone 应用程序中使用 GetPixel 函数?
【发布时间】:2015-10-20 13:44:35
【问题描述】:

我无法在我的 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 步:阅读并理解这个 - stackoverflow.com/tour 第 2 步:编辑这个问题
  • 发布您的代码。我们不是魔术师,无法读懂你的想法。
  • 查看 nuget 包 WriteablebitmapEx,我很确定它有一个 WritePixel

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


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-25
    • 1970-01-01
    • 2015-08-28
    • 1970-01-01
    相关资源
    最近更新 更多