Example #1
0
 def __init__(self, ratio):
     """
     :param ratio: New aspect ratio for the image
     
     """
     Filter.__init__(self, ratio)
     self.ratio = ratio * 1.0
Example #2
0
 def __init__(self, width, height):
     """
     :param width: The required width of the thumbnail
     :param height: The required height of the thumbnail
     """
     Filter.__init__(self, width, height)
     self.new_size = (width, height)
Example #3
0
    def __init__(self, mask_path):
        """
        :param mask_path: Path to mask image

        """
        Filter.__init__(self, mask_path)
        self.mask_path = mask_path
Example #4
0
 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)
Example #5
0
    def __init__(self, ratio):
        """
        :param ratio: New aspect ratio for the image

        """
        Filter.__init__(self, ratio)
        self.ratio = ratio * 1.0
Example #6
0
    def __init__(self, overlay_path):
        """
        :param overlay_path: System path to the overlay image

        """
        Filter.__init__(self, overlay_path)
        self.overlay_path = overlay_path
Example #7
0
    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)
Example #8
0
 def __init__(self, width, height):    
     """        
     :param width: The required width of the thumbnail
     :param height: The required height of the thumbnail 
     """
     Filter.__init__(self, width, height)
     self.new_size = (width, height)
Example #9
0
    def __init__(self, opacity=.5):
        """
        :param opacity: A floating point value between 0 and 1, where 0

        """
        Filter.__init__(self, opacity)
        self.opacity = opacity
Example #10
0
 def __init__(self, opacity=.5):
     """
     :param opacity: A floating point value between 0 and 1, where 0 
     
     """
     Filter.__init__(self, opacity)
     self.opacity = opacity
Example #11
0
 def __init__(self, mask_path):
     """
     :param mask_path: Path to mask image
     
     """
     Filter.__init__(self, mask_path)
     self.mask_path = mask_path
Example #12
0
 def __init__(self, overlay_path):
     """
     :param overlay_path: System path to the overlay image
     
     """
     Filter.__init__(self, overlay_path)
     self.overlay_path = overlay_path
Example #13
0
    def __init__(self, height, no_upscale=False):
        """
        :param height: New height in pixels
        :param no_upscale: If True the image will only be scaled down

        """
        Filter.__init__(self, height, no_upscale)
        self.height = int(height)
        self.no_upscale = bool(no_upscale)
Example #14
0
    def __init__(self, width, no_upscale=False):
        """
        :param width: New width
        :param no_upscale: If True the image will only be scaled down

        """
        Filter.__init__(self, width, no_upscale)
        self.width = int(width)
        self.no_upscale = bool(no_upscale)
Example #15
0
    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)
Example #16
0
 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)
Example #17
0
 def __init__(self, height, no_upscale=False):
     """
     :param height: New height in pixels
     :param no_upscale: If True the image will only be scaled down
     
     """
     Filter.__init__(self, height, no_upscale)
     self.height = int(height)
     self.no_upscale = bool(no_upscale)
Example #18
0
 def __init__(self, width, no_upscale=False):
     """
     :param width: New width
     :param no_upscale: If True the image will only be scaled down
     
     """
     Filter.__init__(self, width, no_upscale)
     self.width = int(width)
     self.no_upscale = bool(no_upscale)
Example #19
0
    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)
Example #20
0
 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)
Example #21
0
 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
Example #22
0
    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