Resize image as correct ratio.