A little bit more efficient work with canvas size.
Deprecated options.template, the sprite mode, new version.