Convert memory stream to BitmapImage?

后端 未结 2 1034
渐次进展
渐次进展 2020-11-27 15:57

I have an image that was originally a PNG that I have converted to a byte[] and saved in a database. Originally, I simply read the PNG into a memory stream and converted the

2条回答
  •  臣服心动
    2020-11-27 16:43

     using (var stream = new MemoryStream(data))
            {
              var bi = BitmapFrame.Create(stream , BitmapCreateOptions.IgnoreImageCache, BitmapCacheOption.OnLoad);
            }
    

提交回复
热议问题