I am looking for a way to create a hash for an image displayed on an XHTML page using Javascript.
+1
A:
Yes, you can get it via XMLHttpRequest. Note that you would need to play various tricks see http://web.archive.org/web/20071103070418/mgran.blogspot.com/2006/08/downloading-binary-streams-with.html and http://stackoverflow.com/questions/833068/how-to-force-save-as-dialog-box-in-firefox-besides-changing-headers) to get the file as a binary.
Matthew Flaschen
2009-06-10 08:37:14
Thanks, but I'd wish to access an already parsed bitmap data of an image file. Do you have any ideas?
webwise
2009-06-10 14:25:30
No. The actual data should be cached, but you would have to reparse the image in JS.
Matthew Flaschen
2009-06-10 14:56:10
You should probably stick with the XMLHttpRequest, it is your most likely solution.
Dustin Fineout
2009-06-28 12:46:00
+1
A:
On supported browsers you could use a canvas element to get at image data. Get started with this Mozilla article on pixel manipulation.
Paul Dixon
2009-06-10 08:53:21