def quarter_bbox(img):
    'Quarter the bounding box of an image.'
    (left, upper, right, bottom) = img.getbbox()
    xmid = (((left + right) - 1) // 2)
    ymid = (((upper + bottom) - 1) // 2)
    return [(left, upper, xmid, ymid), ((xmid + 1), upper, right, ymid), (left, (ymid + 1), xmid, bottom), ((xmid + 1), (ymid + 1), right, bottom)]
Quarter the bounding box of an image.
def quarter_bbox(img):
    
    (left, upper, right, bottom) = img.getbbox()
    xmid = (((left + right) - 1) // 2)
    ymid = (((upper + bottom) - 1) // 2)
    return [(left, upper, xmid, ymid), ((xmid + 1), upper, right, ymid), (left, (ymid + 1), xmid, bottom), ((xmid + 1), (ymid + 1), right, bottom)]