本文介绍了获取本地图像流。 Windows手机8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有图像(/Assets/Cat.png)。
我需要获得此图片的流。我尝试了一些方法,但都没有成功。我该怎么办?

I have image ( /Assets/Cat.png ). I need to get stream of this image. I have tried some ways, but all of them were unsuccessfully. What should i do?

推荐答案

为了获得图像流,请使用此

In order to get the stream of the image use this

Stream myStream = App.GetResourceStream(new Uri("Assets/Cat.png", UrKind.RelativeOrAbsolute)).Stream;

这篇关于获取本地图像流。 Windows手机8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 19:49