added ability to adjust aspect ratio of images