Conditionally scaling image to fix dimensions: we do this because the Bicubic scaling blurs the image slightly even if the size does not change