This fiddle demonstrates how to circumvent the error message "VM101:61 Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported." that occurs in Chrome.
By adding crossOrigin="Anonymous" to the <img> tag the image data from the canvas can be downloaded.
Related Stackoverflow questions:
http://stackoverflow.com/questions/22710627/tainted-canvases-may-not-be-exported
http://stackoverflow.com/questions/9972049/cross-origin-data-in-html5-canvas