2016-08-03 3 views
1

이미지를 스트림에 쓰고 나중에 읽으 려합니다.
Im on Win 10 UWP.
내 코드 : (: 이미지의 크기가 너무 작은 오류) 그것은 작동하지 않습니다InMemoryRandomAccessStream에 쓰고 읽는 방법?

InMemoryRandomAccessStream imrasIn = new InMemoryRandomAccessStream(); 
await _mediaCapture.CapturePhotoToStreamAsync(ImageEncodingProperties.CreateJpeg(), imrasIn); 
DetectedFaces = await _faceClient.DetectAsync(imrasIn.GetInputStreamAt(0).AsStreamForRead()); 

는 DetectAsync 빈 스트림을 가져옵니다.
다른 수업이 필요합니까? CapturePhotoToStreamAsyncIRandomAccessStream이고 DetectAsyncStream이 필요합니다.

imrasIn.Seek(0); 
:

답변

1

나는 읽기 전에 (그리고 쓰기 후) 스트림을 되감기했다
관련 문제