Top Features of GroupDocs.Redaction for Python via .NET

Protect Sensitive Images in JPEG Files with Overlays Using Python

Keep your images safe in JPEG files using Python. Easy tools to help you protect private content in just a few steps.

Keep Jpeg Files Secure

GroupDocs.Redaction for Python via .NET allows your Python via .NET applications to cover sensitive data fast and effectively.

  1. Create a Redactor object and specify the path to the Jpeg file.
  2. Define redaction settings as needed.
  3. Mark the image area and select overlay color.
  4. Run redaction and save the protected file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Hide image areas in JPEG files

# Define overlay size 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 area to mask
replacement_point = grd.Point(200, 200)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)
        
# Load file through Redactor
with gr.Redactor("input.jpg") as redactor:

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

Redact Content Across Documents

GroupDocs.Redaction for Python via .NET helps you hide or delete sensitive content in multiple file formats. Keep your files safe and ready for sharing.

Feature-Rich Redaction Tools

Search and Replace Text

Look for private text in documents and replace it to secure your data.

Cover Image Areas

Apply overlays to hide images or selected sections to protect sensitive visuals.

Clean Metadata

Delete hidden metadata to avoid unintentional data leaks.

Protect Image Areas with Overlays

This example guides you on how to cover sensitive image parts 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 size, 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))
]

# Load file for editing
with gr.Redactor("source.jpg") as redactor:

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

    # Save the redacted 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

About GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction for Python via .NET equips Python developers with simple tools to hide or erase content in JPEG files. Protect sensitive text, images, and metadata with ease.
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 JPEG Files with Python Redaction Tools

With Python, you can hide or erase private data in JPEG files. A reliable solution for keeping documents professional and secure.

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