How to convert a byte array into an image?

后端 未结 8 2116
一向
一向 2020-12-01 05:51

Using Javascript, I\'m making an AJAX call to a WCF service, and it is returning a byte array. How can I convert that to an image and display it on the web page?

8条回答
  •  一向
    一向 (楼主)
    2020-12-01 06:28

    You would probably want to create a data-uri from your data and put it in the src attribute of an img element

    http://en.wikipedia.org/wiki/Data_URI_scheme

提交回复
热议问题