Main Features of GroupDocs.Redaction for Java

Protect Private Images in IMAGE Files Using Overlays with Java

Secure business and personal images in IMAGE files with Java. Easy tools for quick and reliable data protection.

Secure Content in Image Files Using Overlays

Quickly cover sensitive areas in your Java applications with GroupDocs.Redaction for Java.

  1. Create a Redactor object and specify your Image file path.
  2. Set redaction options as required.
  3. Mark the image sections and pick overlay colors.
  4. Process and save your redacted file.
// Hide image content in IMAGE

// Load file using Redactor
final Redactor redactor = new Redactor("input.png");
try
{
    // Set overlay dimensions and colors
    java.awt.Dimension replacement_size = new java.awt.Dimension(100, 100);
    RegionReplacementOptions replacement_options = 
        new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);

    // Choose the area to protect
    java.awt.Point replacement_point = new java.awt.Point(200, 200);
    ImageAreaRedaction redaction = 
        new ImageAreaRedaction(replacement_point, replacement_options);

    // Apply overlay and save file
    RedactorChangeLog result = redactor.apply(redaction);
    redactor.save();
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Redact Sensitive Content in Any Document

GroupDocs.Redaction for Java helps you hide or delete private content in multiple file formats. Ensure documents remain clean and safe for distribution.

Redaction Tools with Full Control

Search and Replace Text

Find sensitive text in documents and replace it to protect information.

Cover Images with Overlays

Use overlays to hide full images or specific sections.

Clean Metadata

Erase or edit hidden metadata to prevent data leaks.

Mask Image Areas with Overlays

This code example demonstrates how to hide sensitive image parts using overlays.

Java

//  Open the file for editing
final Redactor redactor = new Redactor("source.png");
try
{
    // Define overlay size, color, and position
    java.awt.Dimension replacement_size = new java.awt.Dimension(300, 30);
    RegionReplacementOptions replacement_options = 
      new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);
    java.awt.Point replacement_point = new java.awt.Point(20, 125);
    ImageAreaRedaction redaction = new ImageAreaRedaction(replacement_point, replacement_options);

    // Select image area on page one
    redaction.setFilters(new RedactionFilter[] {
        new PageRangeFilter(PageSeekOrigin.Begin, 0, 1),
        new PageAreaFilter(new java.awt.Point(0, 300), new java.awt.Dimension(600, 600))
    });

    // Apply overlay to mask content
    redactor.apply(redaction);

    // Save the modified file
    SaveOptions save_options = new SaveOptions();
    save_options.setAddSuffix(true);
    save_options.setRasterizeToPDF(false);
    redactor.save(save_options);
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

About GroupDocs.Redaction for Java

GroupDocs.Redaction for Java gives Java developers the ability to hide or erase content in IMAGE files. Protect documents by masking sensitive 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.

Secure IMAGE Files with Java Redactions

With Java, you can easily hide or delete sensitive content in IMAGE files. A reliable solution to keep documents safe and confidential.

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