Cleaned imageByScalingProportionallyToFitSize implementation and added the option to draw a rounded image.