I'm trying to get the ImageData without using canvas. I will be passing the image data into tensorflow poseEstimation hence I don't want to display it on the screen.
I've tried to create an in-memory canvas according to this stackoverflow post but can't seem to get it to work.
  const data = ffmpeg.FS("readFile", "file_1.png");
  // data = Uint8Array
  const canvas = document.createElement("canvas");
  const context = canvas.getContext("2d");
  context.drawImage(data, 0, 0);
  const myData = context.getImageData(0, 0);
  console.log("myData", myData);
