@classmethod
def crop_sizes(cls, original_width, original_height, target_width,
    target_height):
    """
        Calculate crop parameters for outbound mode
        :param original_width: int
        :param original_height: int
        :param target_width: int
        :param target_height: int
        :return: tuple(int, int, int, int)
        """
    if target_width < original_width:
        left = abs(original_width - target_width) / 2
        right = left + target_width
    else:
        left = 0
        right = original_width
    if target_height < original_height:
        upper = abs(original_height - target_height) / 2
        lower = upper + target_height
    else:
        upper = 0
        lower = original_height
    return left, upper, right, lower
