I am currently trying to import an image onto a certain site, but the image's src
is blocked by CSP as well as simply setting the image's src
to the base64 data. I am trying to draw the image by importing the ImageData
of the image as a compressed string off-site [ImageData
is for a 600x600 canvas, so 1.44 million elements] and then decompressing the string on-site and displaying the image with the canvas
element.
Essentially, I need to take raw RGBA data, compress it into a string for storage, and decompress the string to display on a canvas
element as an ImageData
object.