I'm currently using the WriteableBitmapEx extension for my writeable Bitmap class. So far everything works now I'm doing this in a WinRT project. I run this code to merge the bitmaps together.
Windows.Storage.Pickers.FileSavePicker save = new Windows.Storage.Pickers.FileSavePicker();
save.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.Desktop;
save.DefaultFileExtension = ".png";
save.FileTypeChoices.Add("PNG", new string[] { ".png" });
StorageFile filesave = await save.PickSaveFileAsync();
IOutputStream ab = await filesave.OpenAsync(FileAccessMode.ReadWrite);
if (ab != null)
{
// await _inkManager.SaveAsync(ab);
var imageUri = new Uri("http://i.imgur.com/rbiLg5Z.gif");
var fullSizeBitmap = new Windows.UI.Xaml.Media.Imaging.BitmapImage(imageUri);
// image.Source = fullSizeBitmap;
var file = await WebFile.SaveAsync(imageUri);
WriteableBitmap myTempImage = await new WriteableBitmap(1, 1).LoadAsync(file);
// error!
myImage.Blit(new Rect(0, 0, 20, 28), myTempImage, new Rect(0, 0, 20, 38));
Now on the line of myImage.Blit
I get an unhandled exception for access violation. I really truly don't understand what's going on or what I'm doing wrong. So an help would be appreciated.