def combined_bbox(layers):
    bboxes = [layer.bbox for layer in layers
              if layer.bbox is not None and layer.bbox.width > 0 and layer.bbox.height > 0]
    if not bboxes:
        return None

    lefts, tops, rights, bottoms = zip(*bboxes)
    return BBox(min(lefts), min(tops), max(rights), max(bottoms))
Returns a bounding box for ``layers`` or None if this is not possible.
dataset/ETHPy150Open psd-tools/psd-tools/src/psd_tools/user_api/psd_image.py/combined_bbox