-2

我在下面的代码中将 IRandomAccessStream 转换为 RandomAccessStreamReference,但是当我看到结果时,没有图像可供共享。我该如何处理?

if (imageFile != null)
{
    using (IRandomAccessStream fileStream = await util.imageFile.OpenAsync(Windows.Storage.FileAccessMode.Read))
    {
        this.imageStreamRef = RandomAccessStreamReference.CreateFromFile(imageFile);
        this.dataPackageThumbnail = this.imageStreamRef;
        //  this.imageStream = await util.imageFile.OpenAsync(FileAccessMode.Read);
        await fileStream.FlushAsync();
    }
}
4

1 回答 1

-1

http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.streams.irandomaccessstream

尝试重置流(Seek)。

于 2012-06-12T10:07:55.380 回答