Resize images once on browsers that support canvas, from a source or an image object