Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a watermark in Python

I'm trying to figure out how to create this kind of watermark, especially the one that's in the center (it's not an ad, it's just a perfect example of what I want to accomplish):

enter image description here enter image description here

like image 535
imatahi Avatar asked Mar 16 '23 01:03

imatahi


1 Answers

Python's wand library has a Image.watermark method that can simplify common watermark operations.

from wand.image import Image

with Image(filename='background.jpg') as background:
  with Image(filename='watermark.png') as watermark:
    background.watermark(image=watermark, transparency=0.75)
  background.save(filename='result.jpg')
like image 123
emcconville Avatar answered Mar 20 '23 00:03

emcconville