Preserve aspect ratio during image resize.