I'm using WriteableBitmap.Render to convert an InkPresenter control to a byte array and Image.
This is my code:
var bitmap = new WriteableBitmap(element, null);
bitmap.Render(element, null);
bitmap.Invalidate();
BitmapImage img;
using (var ms = new MemoryStream())
{
bitmap.SaveJpeg(ms, bitmap.PixelWidth, bitmap.PixelHeight, 0, 85);
// byte[] bytes = ms.ToArray();
img = new BitmapImage();
img.SetSource(ms);
}
If I save the result (byte array or Image) into IsoladtedStorage, the Image has the correct size but is only black.
I don't have an idea why it does not work because I've already used this method with the Map control.