__init__ constructor

On this page

init

Initializes a new ImageAreaRedaction for redacting a specific rectangular area.

def __init__(self, top_left, options):
    ...
Parameter Type Description
top_left Point Top-left area coordinates.
options RegionReplacementOptions Area size and color.

Example

from groupdocs.redaction.redactions import ImageAreaRedaction, RegionReplacementOptions
from groupdocs.redaction.options.drawing import Point, Size, Color

# Define the top-left corner and size of the area to redact
point = Point(385, 485)
size = Size(1793, 2069)

# Define the redaction box color
color = Color.from_argb(255, 220, 20, 60)

# Create replacement options and the redaction instance
repl_opt = RegionReplacementOptions(color, size)
img_red = ImageAreaRedaction(point, repl_opt)

See Also

On this page