Core Features of GroupDocs.Redaction for Java

Hide Sensitive Images in JPEG Files with Overlays Using Java

Protect personal and business images in JPEG files using Java. Simple tools to help you secure your documents easily.

Hide Private Data in Jpeg Files

GroupDocs.Redaction for Java makes it quick for your Java apps to cover private content.

  1. Initialize a Redactor object and load your Jpeg file.
  2. Adjust redaction settings to fit your needs.
  3. Select the image area and choose overlay color.
  4. Apply the redaction and save the file.
// Mask image data in JPEG files

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

    // Pick 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 changes
    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

Hide Sensitive Data in Documents

GroupDocs.Redaction for Java helps you hide or remove private content from multiple file types. Make sure your documents stay clean and ready for sharing.

All-in-One Redaction Features

Find and Replace Text

Search your documents for private text and replace it to protect sensitive data.

Cover Image Content

Use overlays to hide entire images or selected parts to keep visuals private.

Remove Metadata

Erase hidden metadata to prevent accidental exposure of sensitive information.

Use Overlays to Hide Image Content

This example shows how to protect sensitive image areas in documents using overlays.

Java

//  Load the file for redaction
final Redactor redactor = new Redactor("source.jpg");
try
{
    // Set overlay size, position, and color
    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 an image area on the first page
    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 the image
    redactor.apply(redaction);

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

What is GroupDocs.Redaction for Java?

GroupDocs.Redaction for Java provides Java developers with tools to hide or delete content in JPEG files. Secure your documents by covering text, images, and metadata easily.
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 JPEG Files with Java Redactions

Use Java to hide or erase sensitive data in JPEG files. A trusted solution to protect your important 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