This script applies a watermark to an image using the Python Imaging Library. It supports color, tiling, scaling, and opacity reduction.
Use the watermark function to blend a watermark into an image. The image and watermark are PIL images. The position is either an (x,y) tuple, "tile", or "scale". The opacity is a number between 0 and 1; lower values make the watermark less intrusive and less visible.
The watermark function uses the reduce_opacity function, but if you're applying a watermark to many images, you can use the reduce_opacity function to premultiply the watermark.
This code requires PIL 1.1.4. It is fast, but it may consume a large amount of memory when working with large images.