RegionReplacementOptions class
Leave feedback
On this page
Represents color and area parameters for image region replacement.
Learn more:
- More details about image redactions: https://docs.groupdocs.com/redaction/python-net/image-redactions/
The RegionReplacementOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new RegionReplacementOptions instance. |
| init | Initializes a new RegionReplacementOptions instance whose size matches the given text. |
| Property | Description |
|---|---|
| area_fill_color | The color used to fill the redacted area. This property is obsolete; use RegionReplacementOptions.FillColor instead. |
| area_size | The rectangle width and height; this property is obsolete—use RegionReplacementOptions.size instead. |
| fill_color | The color used to fill the redacted area. |
| size | The rectangle width and height. |
from groupdocs.redaction.redactions import ImageAreaRedaction, RegionReplacementOptions
from groupdocs.redaction.options.drawing import Color, Point, Size
from groupdocs.redaction import Redactor, RedactionStatus
def redact_image_area():
point = Point(516, 311)
size = Size(170, 35)
repl_opt = RegionReplacementOptions(Color.Blue, size)
img_red = ImageAreaRedaction(point, repl_opt)
with Redactor("D:\\test.jpg") as redactor:
result = redactor.apply(img_red)
if result.status != RedactionStatus.FAILED:
redactor.save()
Task guides that use RegionReplacementOptions:
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.