expects integer, fixes canvas size bug #6

thanks to http://stackoverflow.com/a/16502793/592125
Merge pull request #8 from forresto/patch-1

expects integer, fixes canvas size bug #6