If your image URL (the original URL, not the data URL) is from a different domain than that of the page where the code runs, then the canvas will be tainted when you draw the image to it, and you wont be able to get the pixels back out. That's a security measure. Thus if you're testing on jsfiddle and you're using http://placekitten.com/100/100
urls to test, it won't work.
Note that most modern browsers do not consider two file://
URLs to share a domain, so if you're running the test from local files, it won't work.