Search code examples
c#windows-phone-7writeablebitmapex

WriteableBitmapEx Windows Phone dll's


I am currently trying to overlay two bitmaps using WriteableBitmapEx using this method found in the documentation:

writeableBmp.Blit(new Point(10, 10), bitmap, sourceRect, 
        Colors.White,WriteableBitmapExtensions.BlendMode.Additive);

I installed the package via NuGet which adds ...WinPhone.dll and WinPhoneXnaDependant.dll which seems to cause the problem. Here's the code I'm currently writing:

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

However, an error states that the WriteableBitmapExtensions.BlendMode.Additive *exists in both* the aforementioned dlls. I've tried getting rid of both and keeping one but I need both it appears for the above code.

Any ideas?


Solution

  • Remove the reference to the WinPhoneXnaDependant if you're not creating a XNA project.

    If the problem persists, ping the author, René Schulte on Twitter.