I was attempting to display an image from an IO stream for WP7, and for some reason it took me an age to get this in place. So here it is … may I never forget.

    System.IO.Stream str = Utilities.GetImageFromStream();
    if (str != null)
    {
        WriteableBitmap bitmap = Microsoft.Phone.PictureDecoder.DecodeJpeg(str);
        phoneimage.Source = bitmap;
    }


Comment Section

Comments are closed.