Working resize image and canvas scripts.