Added unit testing for cropping from position with ratios