[SOLVED] How to load image from MemoryStream?

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Posts: 4
Joined: Wed May 11, 2016 10:23 am

[SOLVED] How to load image from MemoryStream?

Postby bmcguire » Tue May 17, 2016 12:31 pm


Is there a work around for loading a BitmapImage from a MemoryStream, given that SetSource does not seem to be supported yet?



JS-Support @Userware
Site Admin
Posts: 1128
Joined: Tue Apr 08, 2014 3:42 pm

Re: How to load image from MemoryStream?

Postby JS-Support @Userware » Sat Mar 04, 2017 8:05 pm


We are pleased to inform you that the SetSource feature, to load an image from MemoryStream, has been implemented in Beta 10.10 and newer.

Here is an example showing a WCF SOAP web service that returns an image as a byte array:

Code: Select all

void proxy_GetImageCompleted(object sender, GetImageCompletedEventArgs e)
    byte[] byteArray = e.Result.Image;
    using (MemoryStream stream = new MemoryStream(byteArray, 0, byteArray.Length))
        BitmapImage b = new BitmapImage();
        imageControl.Source = b;

Please note that, in case of large images, it is recommended to load the image from a URL instead of a byte array/stream instead, to ensure the best memory consumption and performance.

You can download the latest version of the product from:


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 7 guests