0

Looking for ways via javascript to get create an image based on a certain height and width and then get base64 for that image. i.e. 400px height and 200px width.

I.e. I just need to create dummy image based on certain container size. So I would not have a "src" for the image it can literally be a blank image.

If that's possible then also get the base64 for this image.

Any ideas if thats doable?

StevieB
  • 6,263
  • 38
  • 108
  • 193
  • 1
    Does this answer your question? [Getting binary (base64) data from HTML5 Canvas (readAsBinaryString)](https://stackoverflow.com/questions/15685698/getting-binary-base64-data-from-html5-canvas-readasbinarystring) – Mister Jojo Feb 22 '21 at 21:51
  • Check this link https://stackoverflow.com/questions/6150289/how-can-i-convert-an-image-into-base64-string-using-javascript – optimalLight Feb 22 '21 at 21:58

0 Answers0