x = canvas.getContext("2d")
              ctx.putImageData(imageData, 0, 0)
            }
          } finally {
            // Both the inputData and jpegOutputData objects must be manually deleted in order to
            // avoid leaking memory from the WASM heap.
            inputData.delete()
            if (jpegOutputData) {
              jpegOutputData.delete()
            }
          }
        } else {
          console.error("Unable to locate pixelData for image")
        }
      }

      function on