__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 System.Drawing.Point Top-left area coordinates.
options RegionReplacementOptions Area size and color.

Example

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

# Define the top-left corner of the area to redact
top_left = Point(385, 485)
# Define the size and color of the redaction region
region_options = RegionReplacementOptions(Color.from_argb(255, 220, 20, 60), Size(1793, 2069))

# Create the redaction object
redaction = ImageAreaRedaction(top_left, region_options)

See Also

On this page