Added square image and rotate function