Class TeleaWatermarkOptions

TeleaWatermarkOptions class

The common Telea Algorithm options.

public class TeleaWatermarkOptions : WatermarkOptions

Constructors

NameDescription
TeleaWatermarkOptions(GraphicsPath)Initializes a new instance of the TeleaWatermarkOptions class.
TeleaWatermarkOptions(Point[])Initializes a new instance of the TeleaWatermarkOptions class.

Properties

NameDescription
GraphicsPathMask { get; set; }Gets or sets the mask.
HalfPatchSize { get; set; }Gets or sets the half patch size.
Mask { get; set; }Gets or sets the mask.
PrecalculationProgressEventHandler { get; set; }Gets or sets the default points pre-calculation process progress event handler.

Examples

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

[C#]

var imageFilePath = "ball.png"; 
using (var image = Image.Load(imageFilePath))
{
    var pngImage = (PngImage)image;

    var mask = new GraphicsPath();
    var firstFigure = new Figure();
    firstFigure.AddShape(new EllipseShape(new RectangleF(350, 170, 570 - 350, 400 - 170)));
    mask.AddFigure(firstFigure);

    var options = new TeleaWatermarkOptions(mask);

    var result = WatermarkRemover.PaintOver(pngImage, options);

    result.Save(outputPath);
}

See Also