GroupDocs.Watermark for Python via .NET

Quick Image Watermarking with Python

Our Python tool lets you quickly add watermarks to images. Supports many formats, from photos to digital art.

Easily Add Watermarks: Python Watermarking for Image

GroupDocs.Watermark for Python via .NET is a library that makes it easy to add watermarks to many business file types. Follow these steps to quickly add watermarks to your documents in Python:

  1. Get Started with Watermarking: Begin by creating an instance of the Watermarker class. Pass your Image file (as a path or stream) to the constructor to open it for watermarking.
  2. Create Your Watermark: Make a Watermark object with your desired text and settings. You can add watermarks to any page or even to document elements like headers or attachments.
  3. Customize the Watermark: Adjust the watermark’s size, position, font, color, and alignment to fit your needs. This helps your watermark look just right in your document.
  4. Apply and Save: Use the Watermarker method to add your watermark(s) to the document. Save the result, ideally to a new file for safety.
# Add a text watermark to a IMAGE file
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.common as gwс

# Select the file you want to watermark
with gw.Watermarker("input.jpeg") as watermarker:

    # Create a text watermark object
    font = gww.Font("Arial", 36.0)
    watermark = gww.TextWatermark("top secret", font)
    watermark.foreground_color = gww.Color.red
    watermark.horizontal_alignment = gwс.HorizontalAlignment.CENTER
    watermark.vertical_alignment = gwс.VerticalAlignment.CENTER
    watermark.opacity = 0.4

    watermarker.add(watermark)

    # Save the updated IMAGE file
    watermarker.save("output.jpeg")
pip install groupdocs-watermark-net
click to copy
copied
More examples Documentation

Explore More Watermarking Features

Use our Python API to add, view, convert, and manage watermarks in documents, slides, diagrams, and more. GroupDocs.Watermark for Python via .NET helps you protect your files and add copyright information easily.

Add Watermark

Add Watermarks Easily

GroupDocs.Watermark lets Python developers quickly add text, image, or dynamic watermarks to business documents. Keep your files secure and branded with minimal effort.

Fully Customizable Watermarks

Change watermark size, rotation, transparency, color, and font with GroupDocs.Watermark. Make your watermark fit your document perfectly and keep important content visible.

Use Document Features for Watermarking

Take advantage of built-in document features like PDF annotations, Word backgrounds, or Excel headers to add watermarks. GroupDocs.Watermark works with document structures for effective, non-intrusive watermarking.

Add an Image Watermark to DOCX

This example shows how to apply image effects to shape watermarks.

Python

import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options as gwo
import groupdocs.watermark.options.wordprocessing as gwow

# Open a Word document
load_options = gwow.WordProcessingLoadOptions()
with gw.Watermarker("source.docx", load_options) as watermarker:

    # Set watermark options
    with gww.ImageWatermark("logo.png") as watermark:

        effects = gwow.WordProcessingImageEffects()
        effects.brightness = 0.7
        effects.contrast = 0.6
        effects.chroma_key = gww.Color.red

        options = gwow.WordProcessingWatermarkSectionOptions()
        options.Effects = effects;

        # Create the watermark
        watermarker.add(watermark, options)

        # Save the document with the watermark
        watermarker.save("result.docx")

GroupDocs.Watermark for Python via .NET

GroupDocs.Watermark for Python via .NET helps you add watermarks to images in Python. It supports JPEG, PNG, BMP, TIFF, and more. You can change the watermark’s opacity, size, and position to fit your needs. Use it to protect your images or add branding, all while keeping the original quality.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Watermark for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Add Watermarks to Images with Python

Protect your images with our Python toolkit. Add watermarks to many image formats quickly and easily.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English