implemented resizing and rotating in imagemagick