I want to, from JavaScript, access as a variable the file that is loaded as an image in an img tag.
I don’t want to access its name, but the actual data.
The reason for this is that I want to be able to copy it to and from variables so that I can , among other things, change the image without reloading it.
Can this be done? If so, how?
Note: I’m slightly more interested in reading the data than writing it.
1 Answer