TeleaWatermarkOptions

Inheritance: java.lang.Object, com.aspose.imaging.watermark.options.WatermarkOptions

public class TeleaWatermarkOptions extends WatermarkOptions

The common Telea Algorithm options.

Constructors

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

Methods

MethodDescription
getHalfPatchSize()Gets the half patch size.
setHalfPatchSize(int value)Sets the half patch size.

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

String imageFilePath = "ball.png";
String outputPath = "no-watermark.png";
try (Image image = Image.load(imageFilePath))
{
    PngImage pngImage = (PngImage) image;
    GraphicsPath mask = new GraphicsPath();
    Figure firstFigure = new Figure();
    firstFigure.addShape(new EllipseShape(new RectangleF(350, 170, 570 - 350, 400 - 170)));
    mask.addFigure(firstFigure);

    TeleaWatermarkOptions options = new TeleaWatermarkOptions(mask);

    try (RasterImage result = WatermarkRemover.paintOver(pngImage, options))
    {
        result.save(outputPath);
    }
}

TeleaWatermarkOptions(Point[] mask)

public TeleaWatermarkOptions(Point[] mask)

Initializes a new instance of the TeleaWatermarkOptions class.

Parameters:

ParameterTypeDescription
maskPoint[]The mask for the unknown area.

TeleaWatermarkOptions(GraphicsPath mask)

public TeleaWatermarkOptions(GraphicsPath mask)

Initializes a new instance of the TeleaWatermarkOptions class.

Parameters:

ParameterTypeDescription
maskGraphicsPathThe mask for the unknown area.

getHalfPatchSize()

public final int getHalfPatchSize()

Gets the half patch size.

Value: The patch size.

Returns: int - the half patch size.

setHalfPatchSize(int value)

public final void setHalfPatchSize(int value)

Sets the half patch size.

Value: The patch size.

Parameters:

ParameterTypeDescription
valueintthe half patch size.