Avoid resize operation if image is already the correct size

For the sake of speed, if the image being resized is already the correct size, do not run the resize operation.