Skip to main content
100%

Gist efe06cf99253646a0da41501d118459a

✓ Published0🌍 Public
CCharlesFr
Last edited Sep 22, 2018
Created on Sep 22, 2018

This example demonstrates a Python function that automatically adds watermarks and logos to images. It opens an input image, resizes a secondary watermark image to 70% of the image width and a logo to 15% of the width, then pastes the watermark at the center and the logo at the bottom-left corner using the PIL `Image.paste` method with alpha-channel masks. The process uses `Image.open` with `convert('RGBA')` to handle transparency, and finally saves the composited result in RGB format.

AI-generated description

Similar vizzes