TeleaWatermarkOptions Class

Summary: The common Telea Algorithm options.

Module: aspose.imaging.watermark.options

Full Name: aspose.imaging.watermark.options.TeleaWatermarkOptions

Inheritance: WatermarkOptions

Aspose.Imaging Version: 24.6.0

Constructors

NameDescription
TeleaWatermarkOptions(mask)Initializes a new instance of the TeleaWatermarkOptions class.
TeleaWatermarkOptions(mask)Initializes a new instance of the TeleaWatermarkOptions class.

Properties

NameTypeAccessDescription
graphics_path_maskGraphicsPathr/wGets or sets the mask.
half_patch_sizeintr/wGets or sets the half patch size.
maskiter[Point]r/wGets or sets the mask.

Constructor: TeleaWatermarkOptions(mask)

 TeleaWatermarkOptions(mask) 

Initializes a new instance of the TeleaWatermarkOptions class.

Parameters:

ParameterTypeDescription
maskPoint[]The mask for the unknown area.

Constructor: TeleaWatermarkOptions(mask)

 TeleaWatermarkOptions(mask) 

Initializes a new instance of the TeleaWatermarkOptions class.

Parameters:

ParameterTypeDescription
maskGraphicsPathThe mask for the unknown area.

Examples

The example shows how to remove any object from the image using Graphics Path with Telea algorithm.

from aspose.imaging import Image, Figure, GraphicsPath, RectangleF
from aspose.imaging.shapes import EllipseShape
from aspose.imaging.watermark import WatermarkRemover
from aspose.imaging.watermark.options import TeleaWatermarkOptions
from aspose.imaging.fileformats.png import PngImage
import aspose.pycore import as_of

image_file_path = "ball.png"; 
with Image.load(image_file_path) as image:
	pngImage = as_of(image, PngImage)
	mask = GraphicsPath()
	firstFigure = Figure()
	firstFigure.add_shape(EllipseShape(RectangleF(350, 170, 570 - 350, 400 - 170)))
	mask.add_figure(firstFigure);
	options = TeleaWatermarkOptions(mask)
	with WatermarkRemover.paint_over(pngImage, options) as result:
		result.save(outputPath)