1. Create a image
2. Set the source to the data url.
3. When it loads, create a canvas, and draw the image to it.
4. The canvas then has a function to get the image data array.
I don’t know any of the syntax exactly offhand but it’s something you can find online.