Update canvas2image.js

add  :
```
if (typeof canvas == "string") { canvas = document.getElementById(canvas); }
```
Update canvas2image.js

Cosmetics :

remove ending-spaces
Merge pull request #2 from finscn/patch-1

Update canvas2image.js