def get_padding_size(image):
    (h, w, _) = image.shape
    longest_edge = max(h, w)
    (top, bottom, left, right) = (0, 0, 0, 0)
    if (h <= longest_edge):
        dh = (longest_edge - h)
        top = (dh // 2)
        bottom = (dh - top)
    elif (w <= longest_edge):
        dw = (longest_edge - w)
        left = (dw // 2)
        right = (dw - left)
    else:
        pass
    return (top, bottom, left, right)
def get_padding_size(image):
    (h, w, _) = image.shape
    longest_edge = max(h, w)
    (top, bottom, left, right) = (0, 0, 0, 0)
    if (h <= longest_edge):
        dh = (longest_edge - h)
        top = (dh // 2)
        bottom = (dh - top)
    elif (w <= longest_edge):
        dw = (longest_edge - w)
        left = (dw // 2)
        right = (dw - left)
    else:
        pass
    return (top, bottom, left, right)