我目前正在尝试使用文档中的此方法使用WriteableBitmapEx覆盖两个位图:
writeableBmp.Blit(new Point(10, 10), bitmap, sourceRect,
Colors.White,WriteableBitmapExtensions.BlendMode.Additive);
我通过 NuGet 安装了该软件包,它添加了 ...WinPhone.dll 和 WinPhoneXnaDependant.dll 这似乎导致了问题。这是我目前正在编写的代码:
WriteableBitmap result = new WriteableBitmap(results, null);
WriteableBitmap overlay = new WriteableBitmap(0, 0).FromResource("Images/VizageOverlay.png");
var cropped = result.Crop(96, 0, 480, 728);
cropped.Blit(new Point(0, 0), overlay, new Point(0,0),
WriteableBitmapExtensions.BlendMode.Additive);
但是,错误指出WriteableBitmapExtensions.BlendMode.Additive *存在于上述两个 dll 中。我已经尝试摆脱两者并保留一个,但我需要两者都出现在上面的代码中。
有任何想法吗?