2

I am looking for a way to create a hash for an image displayed on an XHTML page using Javascript.

webwise
  • 617
  • 9
  • 21
  • I know that I can use Flash in order to access the BitmapData information. But I'd really like to do it with JavaScript alone. – webwise Jun 10 '09 at 14:44

2 Answers2

1

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 How to force save as dialog box in firefox besides changing headers?) to get the file as a binary.

Community
  • 1
  • 1
Matthew Flaschen
  • 268,153
  • 48
  • 509
  • 534
1

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
  • 287,944
  • 49
  • 307
  • 343