'convert YUV image data in javascript

I have "hex" (YUV image data) and i want to transform a YUV image data into a .png using javascript,how can i do this ?

I tried with following code but not working for "yuv image data"

 var base64blob= 'iVBORw0KGgo.....'; // my hex code
  var image = document.createElement('img');
    image.src = 'data:image/png;base64,'+ base64blob;
    document.body.appendChild(image);
    


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source