2
我的代碼:圖像捕捉流SoftwareBitmap
var stream = new InMemoryRandomAccessStream();
ImageEncodingProperties properties = ImageEncodingProperties.CreateJpeg();
await _mediaCapture.CapturePhotoToStreamAsync(properties, stream);
IBuffer buffer = new byte[stream.Size].AsBuffer();
await stream.ReadAsync(buffer, (uint)stream.Size, InputStreamOptions.None);
SoftwareBitmap sfbmp = SoftwareBitmap.CreateCopyFromBuffer(buffer, BitmapPixelFormat.Bgra8, 4176, 3120); // Exception is thrown here
例外:
內存不足的響應
老實說,我不知道有關的位圖緩存東西所以任何人都幫我?