Auto scale by computing the bounding box