Fixed ResizeImage() so it will scale square images correctly.