RegionReplacementOptions class

RegionReplacementOptions class

Represents color and area parameters for image region replacement.

Learn more:

The RegionReplacementOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new RegionReplacementOptions instance.
init Initializes a new RegionReplacementOptions instance whose size matches the given text.

Properties

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.

Example

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()

Guides

Task guides that use RegionReplacementOptions:

See Also