Features of GroupDocs.Redaction for Python via .NET You’ll Need

Cover Sensitive Images in IMAGE Files Using Python Overlays

Protect personal and business image data in IMAGE files using Python. Simple tools for quick and effective protection.

Cover Private Content in Image Files

GroupDocs.Redaction for Python via .NET makes it easy to hide sensitive data in your Python via .NET applications.

  1. Initialize a Redactor and point to your Image file.
  2. Configure the redaction settings as needed.
  3. Choose the image sections and define overlay colors.
  4. Process the file and save the redacted version.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Cover image content in IMAGE

# Specify overlay size and colors
replacement_size = grd.Size(100, 100)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)

# Select area to hide
replacement_point = grd.Point(200, 200)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)
        
# Load the file using Redactor
with gr.Redactor("input.png") as redactor:

    # Apply overlay and save the file
    result = redactor.apply(redaction)
    redactor.save()
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

Protect Data Across Document Types

GroupDocs.Redaction for Python via .NET lets you hide or delete sensitive content in different file formats. Keep your documents clean, secure, and easy to share.

Tools to Control Every Redaction

Search and Replace Sensitive Text

Scan through your documents to replace private text and keep data safe.

Mask Images with Overlays

Add colored overlays to hide images or specific parts of them.

Remove Metadata

Delete or edit hidden metadata to ensure no private data leaks.

Hide Image Content with Overlays

This example shows how to apply overlays to protect sensitive image data in a document.

Python

import groupdocs.redaction as gr
import groupdocs.redaction.options as gro
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Set overlay dimensions, color, and position
replacement_size = grd.Size(300, 30)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)
replacement_point = grd.Point(20, 125)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)

# Pick an image area on page one
redaction.filters = [
    grr.PageRangeFilter(grr.PageSeekOrigin.BEGIN, 0, 1),
    grr.PageAreaFilter(grd.Point(0, 300), grd.Size(600, 600))
]

# Open file for redaction
with gr.Redactor("source.png") as redactor:

    # Apply overlay to mask image content
    result = redactor.apply(redaction)

    # Save the file after redaction
    save_options = gro.SaveOptions()
    save_options.add_suffix = True
    save_options.rasterize_to_pdf = False
    result_path = redactor.save(save_options)
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

Learn About GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction for Python via .NET provides Python developers with tools to hide or remove content in IMAGE files. Secure your documents by covering text, images, and metadata.
Learn more
About illustration

Ready to get started?

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

Useful resources

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

Protect Content in IMAGE Files with Python

With Python, you can hide or delete sensitive information in IMAGE files. A reliable way to keep documents safe and professional.

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