GroupDocs.Redaction for Python via .NET Key Features

Hide Sensitive Images in PHOTO Files with Overlays via Python

Protect image content in PHOTO files with Python. Easy tools for quick and effective data protection.

Protect Image Areas in Photo Files

Use GroupDocs.Redaction for Python via .NET to easily cover sensitive image areas in your Python via .NET applications.

  1. Create a Redactor object and link it to your Photo file.
  2. Configure the redaction settings to fit your task.
  3. Highlight image sections and set overlay colors.
  4. Apply redactions and save the protected file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Use overlays to hide image data in PHOTO

# Set up overlay dimensions and color
replacement_size = grd.Size(100, 100)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)

# Select image areas to mask
replacement_point = grd.Point(200, 200)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)
        
# Open file with Redactor
with gr.Redactor("input.jpeg") 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

Redact Private Data in Multiple Formats

GroupDocs.Redaction for Python via .NET lets you cover or erase sensitive content in different file types. Keep documents clean and safe to share.

All-in-One Redaction Features

Find and Edit Text

Search for sensitive text and replace it to secure your documents.

Hide Images with Overlays

Add overlays to cover full images or specific sections.

Delete Metadata

Remove hidden metadata to prevent data leaks.

Cover Image Sections with Overlays

This code example shows how to mask sensitive image areas in a document using overlays.

Python

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

# Define overlay size, color, and placement
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)

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

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

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

    # Save the secured file
    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

What is GroupDocs.Redaction for Python via .NET?

GroupDocs.Redaction for Python via .NET offers Python developers powerful tools to hide or erase content in PHOTO files. Protect important data by masking text, images, and metadata efficiently.
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.

Redact Sensitive Content in PHOTO with Python

Hide or delete private data in PHOTO files using Python. An easy way to secure official documents.

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