1
にSystem.IO.Streamからの変換:C#UWPが、私は例外を取得ので、私は、IRandomAccessStreamWithContentTypeが、カントを取得しようとしていますWindows.Storage.Streams.IRandomAccessStreamWithContentType
"This IRandomAccessStream does not support the CloneStream method because it requires cloning and this stream does not support cloning."
をそして、これが最後の行に起こります次のコード:
PixelDataProvider pix = await decoder.GetPixelDataAsync(
BitmapPixelFormat.Bgra8,
BitmapAlphaMode.Straight,
transform,
ExifOrientationMode.IgnoreExifOrientation,
ColorManagementMode.ColorManageToSRgb);
byte[] pixels = pix.DetachPixelData();
Stream pixStream = cropBmp.PixelBuffer.AsStream();
pixStream.Write(pixels, 0, (int)(width * height * 4));
IRandomAccessStream iStream= pixStream.AsRandomAccessStream(); //dafaq with streams
RandomAccessStreamReference iReferenceStream= RandomAccessStreamReference.CreateFromStream(iStream);
IRandomAccessStreamWithContentType newStream = await iReferenceStream.OpenReadAsync();
回避策などはありますか?
私もこの方法を試してみました1
編集、まだ動作しません。 (しかし、今、私はクローンが失敗したことをnullではない取得)あなたのコードから