I am currently writing my first windows 8 applications. One of the user scenario’s was, to be download images from a website and to be able to share it with other apps using share contract. I had to spend quite a bit of time to figure out how to do this. I decided to put together a blog post with various samples on how to work with streams.
Scenario 1: Download image as Bytes and convert into RandomAccessStreamReference.
In order to share image data, we need object of type “RandomAccessStreamReference”.
Scenario 2: Download image from a website as a stream and create a RandomAccessStreamReference from it