I am trying to overlay WriteableBitmap with a specific color in Silverlight. I have a black and white base image that I use to create smaller WriteableBitmap images for the new composite image, and I want to overlay either the black or white part of the original image with a specific color before adding it to the composite image.
Now I do the following:
var cutOut = new WriteableBitmap(8, 14);
cutOut.Render(sourceImage, transform);
cutOutImage.Source = cutOut;
compositeImage.Render(cutOutImage, transform2);
I tried the methods http://blogs.silverarcade.com/silverlight-games-101/15/silverlight-blitting-and-blending-with-silverlights-writeablebitmap/ and used the extension methods from hxxp: //writeablebitmapex.codeplex.com/ but I can't seem to get the color overlay on the cutOut image before displaying it in the composite image.
Does anyone know of a good method for doing this?
Thanks in advance.
Rajen source
share