No.
For performance reason are absolute coordinates expected as int.
For performance reason are absolute coordinates expected as int.
- Rene
WriteableBitmap wb = new WriteableBitmap(1500, 1500);
wb.SetSource(fileStream);
For BMP files I get the following error on SetSource: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."This is incredibly important. Right now, it's impossible in Windows Phone apps to do resizing and other heavy operations on large images in the background!
We just have it for a few methods right now and won't have the time to add it soon, but we appreciate code contributions. :)
- Rene
#if NETFX_CORE
private unsafe void CopyPixels()
{
var data = writeableBitmap.PixelBuffer.ToArray();
data = writeableBitmap.PixelBuffer.ToArray(); // *** FIX ***
fixed (byte* srcPtr = data)
{
fixed (int* dstPtr = pixels)
{
for (var i = 0; i < length; i++)
{
dstPtr[i] = (srcPtr[i * 4 + 3] << 24) | (srcPtr[i * 4 + 2] << 16) | (srcPtr[i * 4 + 1] << 8) | srcPtr[i * 4 + 0];
}
}
}
}
#endif
Can you please post a repro solution?