CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

CopyBuffer() method of SoftwareBitmap to an array crashes when trimming is enabled

Open lhak opened this issue 1 year ago • 1 comments

Describe the bug

When using the CopyBuffer() method of a SoftwareBitmap to copy the pixels to a byte array the app crashes with an "Invalid cast" exception if trimming is enabled

To Reproduce

  1. Run attached repro project

SoftwareBitmapTrimRepro.zip

Expected behavior

Should work the same as without trimming enabled

Version Info

WindowsAppSDK 1.2

Additional context

lhak avatar Nov 14 '22 17:11 lhak