Possible Duplicate:
Get image data in Javascript?
Can someone show me a way that I can use a java script function that takes a string path to an image (could be local or on another domain) and returns the base64 encoding of it. But from all the other scripts I found I couldn't use the result in an img src tag, the img didn't load for some reason. the return value needs to look exactly like the .toDataURL(); method.
Thanks