示例#1
0
 def process(self, img):
     self.watermark.image.seek(0)
     mark = Image.open(self.watermark.image.file)
     img = apply_watermark(im=img,
                           mark=mark,
                           position=self.watermark.style,
                           opacity=self.watermark.opacity)
     return img
示例#2
0
 def process(self, img):
     self.watermark.image.seek(0)
     mark = Image.open(self.watermark.image.file)
     img = apply_watermark(im=img, mark=mark, position=self.watermark.style, opacity=self.watermark.opacity)
     return img
示例#3
0
 def post_process(self, im):
     mark = Image.open(self.image.path)
     return apply_watermark(im, mark, self.style, self.opacity)