Difference between Image.FromStream(stream); and Image.SetSource(stream); ?

Dec 24, 2012 at 10:54 AM
Edited Dec 24, 2012 at 11:02 AM

On the outside i would expect both to have identical results, however when i display my image on my windows phone (7.1) and then later wnne an web image is loaded and i use .FromStream(stream) , the image wont show up, if i however use SetSource(stream) it does show up

EDIT1: iv done some more debugging, after i run  .FromStream(stream) the iamge is still empty nothing seems to have happent, only after i run SetSource(stream) it seems to update the image

		private void LoadImage(Stream stream)
Dec 24, 2012 at 11:14 AM

oke after some more testing it seems even tho meta data says

    /// <param name="bmp">The WriteableBitmap.</param><param name="stream">The stream with the image data.</param>
    /// <returns>
    /// The WriteableBitmap that was passed as parameter.
    /// </returns>
    public static WriteableBitmap FromStream(this WriteableBitmap bmp, Stream stream);

the return value is however a new instance of WriteableBitmap and the input parameter is not adjusted