Updated code to deal with tall images.