Added code to scale image

Added code to scale rectangle images to square before making it rounded.