ImageAreaRedaction class
Leave feedback
On this page
Represents a redaction that places a colored rectangle in a given area of an image document.
Learn more:
- More details about applying redactions: https://docs.groupdocs.com/redaction/net/redaction-basics/
- More details about image redactions: https://docs.groupdocs.com/redaction/net/image-redactions/
The ImageAreaRedaction type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new ImageAreaRedaction for redacting a specific rectangular area. |
| Method | Description |
|---|---|
| apply_to | Applies the redaction to a given format instance. |
| apply_to_document_format_instance |
| Property | Description |
|---|---|
| description | The description of the redaction, containing its name and parameters. |
| options | The RegionReplacementOptions options with color and area parameters. |
| top_left | The top-left position of the area to remove. |
from groupdocs.redaction import Redactor, RedactionStatus
from groupdocs.redaction.redactions import ImageAreaRedaction, RegionReplacementOptions
from groupdocs.pydrawing import Point, Size, Color
point = Point(516, 311)
size = Size(170, 35)
color = Color.from_argb(255, 0, 0, 255) # blue
options = RegionReplacementOptions(color, size)
redaction = ImageAreaRedaction(point, options)
with Redactor("D:\\test.jpg") as redactor:
result = redactor.apply(redaction)
if result.status != RedactionStatus.FAILED:
redactor.save()
Task guides that use ImageAreaRedaction:
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.