Classe TeleaWatermarkOptions
Contenu
[
Cacher
]Summary: The common Telea Algorithm options.
Module: aspose.imaging.watermark.options
Full Name: aspose.imaging.watermark.options.TeleaWatermarkOptions
Inheritance: WatermarkOptions
Constructors
| Name | Description |
|---|---|
| TeleaWatermarkOptions(mask) | Initialise une nouvelle instance de la classe TeleaWatermarkOptions. |
| TeleaWatermarkOptions(mask) | Initialise une nouvelle instance de la classe TeleaWatermarkOptions. |
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| graphics_path_mask | GraphicsPath | r/w | Obtient ou définit le masque. |
| half_patch_size | int | r/w | Obtient ou définit la taille du demi-patch. |
| mask | System.Collections.Generic.IEnumerable`1[[Aspose.Imaging.Point]] | r/w | Obtient ou définit le masque. |
Constructor: TeleaWatermarkOptions(mask)
TeleaWatermarkOptions(mask)
Initialise une nouvelle instance de la classe TeleaWatermarkOptions.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| mask | Point[] | Le masque pour la zone inconnue. |
Constructor: TeleaWatermarkOptions(mask)
TeleaWatermarkOptions(mask)
Initialise une nouvelle instance de la classe TeleaWatermarkOptions.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| mask | GraphicsPath | Le masque pour la zone inconnue. |
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)