created imagefile bounding box function