Trying Resize or Blit without any result - winRT

May 30, 2012 at 7:26 AM
Edited May 30, 2012 at 7:26 AM

I'm trying to use WriteableBitmapEx in WinRT without any luck…
I'm trying to use .Resize and .Blit, but when doing so I'm not getting an image on the page.

So my question, am I doing something wrong here? Any thoughts?

To reproduct this I've added my code here: https://gist.github.com/2834070
Just create a new xaml page with an Image called Speakers on it and than inside the OnNavigatedTo method there are several other methods to try out...

  • LoadImageLocal - will work
  • LoadImageLocalResize - will not work
  • LoadImageWeb - will work
  • LoadImageWebResize - will not work
  • BitmapTransform - will work
  • BitmapTransformBlit - will not work

 

 

 

Coordinator
Jun 7, 2012 at 11:10 PM

Sorry for the delay.

There was indeed a bug in the Resize method.

The Blit doesn't work because SetSource is actually async and the data isn't available when you use the Blit method. I added a port of the Blit sample to the WinRT version of the lib.

You can find the fix and the mentioned sample in the source code repository r91455. See http://writeablebitmapex.codeplex.com/SourceControl/changeset/changes/91455

 

- rene

Jun 14, 2012 at 8:06 PM

Hey Rene,

No worries. Thanks for the info and I'll sure have a look at that code :)

Thanks

Glenn

Jun 17, 2012 at 3:21 PM

SUPER! This works great! Thanks for the work guys