Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinRT's WriteableBitmap no longer allows random access to pixel data?

One of the changes in WinRT's WriteableBitmap class is that, instead of exposing a Pixels property as an array, it now has a PixelBuffer of type IBuffer.

The problem is that IBuffer doesn't have any way to do random access to the data. I can create a DataReader and get the data one piece at a time and copy the data to an array for random access, but no direct access to the IBuffer data. How do I do this, or is it impossible?

like image 242
Jeremy Bell Avatar asked Sep 23 '11 21:09

Jeremy Bell


Video Answer


1 Answers

Seems like the exact same discussion happened over at the MSDN Forums.

For now, it doesn't appear that direct pixel manipulation is there, but there are work arounds by working with streams (as you have already noted).

All things considered, it is a developer preview and the functionality may be added in a later build.

like image 127
vcsjones Avatar answered Oct 26 '22 23:10

vcsjones