def post_process(self, im): try: content = default_storage.open(str(self.image)).read() mark = PILImage.open(BytesIO(content)) except IOError as e: raise e return apply_watermark(im, mark, self.style, self.opacity)
def post_process(self, im): try: content = default_storage.open(unicode(self.image)).read() mark = PILImage.open(StringIO(content)) except IOError as e: raise e return apply_watermark(im, mark, self.style, self.opacity)