@staticmethod
def _calculate_zoom_buffer_size(size, value):
    """
        calculates zoom buffer size
        :param size: (width :int, height:int)
        :param value: zoom level int
        :return: zoom buffersize
        """
    if value <= 0:
        raise ValueError("zoom must'nt be zero or less")
    value = 1.0 / value
    return int(size[0] * value), int(size[1] * value)
