Oops.. I just realized that I made an error in canvas size calculation..

Here's the fixed code:

http://pastie.org/215379
http://pastie.org/215380 (specs)

Andrea