I've got a big Uint8Array (frame of a camera) encoded in bgra8 that because of reasons I receive as Buffer. I'm adding this information in case someone points out this could be part of the problem:
This is the data when sent:
This is the code of the conversion of the data when sent:
Buffer.from(cam_message.data)
This is the data when received in the Electron main process (a different frame):

In order to display this data I make the conversion explained here: How to display a JPG image from a Node.js buffer (UInt8Array)
That is, I send this to the renderer process:
Buffer.from(camdata).toString('base64')
In the renderer process I receive this as a variable value, and I update the src of the image:
imgeg.src = `data:image/jpg;base64,${value}`
But the image is never shown (only is shown the "image" icon, so not a problem with HTML). So could this be a problem with the bgra8? Or the Buffer or Uint8Array data types and my lack of knowledge in how to use them?

As @AndrewParks told me, it was a problem with how I tried to display this image as a
jpginstead of treating it asbgra8, which was the correct encoding. This is the code I wrote:Instead of a
Buffernow I convert the data toUint8Arrayagain once I receive it and before sending it to the renderer process:In the renderer process I receive this as a variable
value, and I use a<canvas>instead of an<img>:See: What's the best way to set a single pixel in an HTML5 canvas?