How to display a JPG image from a Node.js buffer (UInt8Array)

前端 未结 3 1915
夕颜
夕颜 2020-12-10 07:08

I have a custom Node.JS addon that transfers a jpg capture to my application which is working great - if I write the buffer contents to disk, it\'s a proper jpg image, as ex

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 07:26

    You need to add img to the DOM.

    Also if you are generating the buffer in the main process you need to pass it on the the render process of electron.

提交回复
热议问题