I am receiving base64 encoded bitmap data through sockets, I decoding this data using atob and now have the bitmap data ready to be drawn on an HTML5 canvas.
I was reading this post
Data URI leak in Safari (was: Memory Leak with HTML5 canvas)
and although I am able to draw my bitmap data on the canvas using context.drawImage(..) I am looking for a different approach, due to memory leaks when alling drawImage too many times.
This post
Data URI leak in Safari (was: Memory Leak with HTML5 canvas)
refers to "creating a pixel data array and writing it to the canvas with putImageData" however there is no code to support this.
How can I create a pixel data array from my bitmap data ?
Basically I want to draw my bitmap data on the canvas, by using putImageData.
Thank you.