Load byte[] into a System.Windows.Controls.Image at Runtime

后端 未结 2 1386
自闭症患者
自闭症患者 2021-01-15 14:24

I have a byte[] that represents a .png file. I am downloading this .png via a WebClient. When the WebClient has downloaded the .png I reference via a URL, I get a byte[]. My

相关标签:
2条回答
  • 2021-01-15 15:08

    Use a PngBitmapDecoder. The docs show example usage.

    0 讨论(0)
  • 2021-01-15 15:15

    In addition to the answers you got on the other question.. which should work fine, you should also be able to create a BitmapImage object and set the UriSource to the web URI instead of using a webclient and then set the Image.Source to the BitmapImage.. See This

    0 讨论(0)
提交回复
热议问题