Bugfix for canvas resizing. Now snapping to integer size, and width a mu...

...ltiple of four pixels.