RegionReplacementOptions
Leave feedback
On this page
Represents color and area parameters for image region replacement. See ImageAreaRedaction.
public class RegionReplacementOptions
| Name | Description |
|---|---|
| RegionReplacementOptions(Color, Size) | Initializes a new instance of RegionReplacementOptions class. |
| RegionReplacementOptions(Color, Font, string) | Initializes a new instance of RegionReplacementOptions class which size matches given text. |
| Name | Description |
|---|---|
| FillColor { get; set; } | Gets or sets the color to fill the redacted area. |
| Size { get; set; } | Gets or sets the rectangle with and height. |
Learn more
- More details about image redactions: Image redactions
The following example demonstrates replacing an area within the image with a solid color rectangle.
using (Redactor redactor = new Redactor("D:\\test.jpg"))
{
System.Drawing.Point samplePoint = new System.Drawing.Point(516, 311);
System.Drawing.Size sampleSize = new System.Drawing.Size(170, 35);
RedactorChangeLog result = redactor.Apply(new ImageAreaRedaction(samplePoint,
new RegionReplacementOptions(System.Drawing.Color.Blue, sampleSize)));
if (result.Status != RedactionStatus.Failed)
{
redactor.Save();
};
}
- namespace GroupDocs.Redaction.Redactions
- assembly GroupDocs.Redaction
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.