ImageAreaRedaction
Contents
 [
        
            Hide
        ]
    ImageAreaRedaction class
Represents a redaction that places colored rectangle in given area of an image document.
public class ImageAreaRedaction : Redaction
Constructors
| Name | Description | 
|---|---|
| ImageAreaRedaction(Point, RegionReplacementOptions) | Initializes a new instance of ImageAreaRedaction class for redacting specific area size. | 
Properties
| Name | Description | 
|---|---|
| override Description { get; } | Returns a string, describing the redaction and its parameters. | 
| Options { get; } | Gets the RegionReplacementOptionsoptions with color and area parameters. | 
| TopLeft { get; } | Gets the top-left position of the area to remove | 
Methods
| Name | Description | 
|---|---|
| override ApplyTo(DocumentFormatInstance) | Applies the redaction to a given format instance. | 
Remarks
Learn more
- More details about applying redactions: Redaction basics
- More details about image redactions: Image redactions
Examples
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();
       };
    } 
See Also
- class Redaction
- namespace GroupDocs.Redaction.Redactions
- assembly GroupDocs.Redaction