Main Features of GroupDocs.Redaction for Java

Protect Image Content in PHOTO Files with Overlays Using Java

Secure personal and business image data in PHOTO files with Java. Simple tools designed for fast and effective protection.

Hide Content in Photo Files with Overlays

GroupDocs.Redaction for Java makes it easy to hide sensitive areas in your Java applications.

  1. Initialize a Redactor and load your Photo file.
  2. Set redaction preferences as needed.
  3. Select image regions and pick overlay colors.
  4. Run redaction and save the file.
// Cover image sections in PHOTO with overlays

// Load file using Redactor
final Redactor redactor = new Redactor("input.jpeg");
try
{
    // Define overlay color and size
    java.awt.Dimension replacement_size = new java.awt.Dimension(100, 100);
    RegionReplacementOptions replacement_options = 
        new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);

    // Mark the image area to cover
    java.awt.Point replacement_point = new java.awt.Point(200, 200);
    ImageAreaRedaction redaction = 
        new ImageAreaRedaction(replacement_point, replacement_options);

    // Apply overlay and save the result
    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 with Ease

GroupDocs.Redaction for Java allows you to hide or erase private data in various document types. Keep your files clean and ready to share.

Full Control Over Redactions

Search and Replace Text

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

Overlay Image Areas

Use overlays to cover entire images or selected parts.

Remove Metadata

Clean hidden metadata to prevent accidental data exposure.

Mask Image Data with Overlays

This example shows how to cover image content with overlays in a document.

Java

//  Load document for editing
final Redactor redactor = new Redactor("source.jpeg");
try
{
    // Set 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);

    // Target image section 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 hide content
    redactor.apply(redaction);

    // Save the edited 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

Learn About GroupDocs.Redaction for Java

GroupDocs.Redaction for Java gives Java developers reliable tools to hide or delete content in PHOTO files. Protect documents by masking 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 PHOTO Files with Java Redactions

With Java, you can hide or remove sensitive data in PHOTO files. A trusted way to protect 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