def __init__(self, col1, col2): """ :param col1: The colour at the top of the image :param col2: The colour at the bottom of the image """ Filter.__init__(self, col1, col2) self.col1 = parse_color(col1) self.col2 = parse_color(col2)
def __init__(self, col): """ :param col: The colour of the background as an HTML string or tuple """ Filter.__init__(self, col) self.col = parse_color(col)
def __init__(self, radius, border=None): """ :param radius: The radius for the corners :param border: The border color as HTML string or tuple """ Filter.__init__(self, radius, border) self.radius = radius self.border = parse_color(border)
def __init__(self, width, height, background_color='#000', background_opacity=255): """ :param width: Width of resized version :param height: Height of resized version :param background_color: Color for the canvas background :param background_opacity: Opacity for canvas background (255 is opaque) """ Filter.__init__(self, width, height, background_color, background_opacity) self.new_size = (width, height) self.background_color = parse_color(background_color) self.background_opacity = background_opacity