Added calculate new ratio from image