TeleaWatermarkOptions
Contents
[
Hide
]Inheritance: java.lang.Object, com.aspose.imaging.watermark.options.WatermarkOptions
public class TeleaWatermarkOptions extends WatermarkOptions
The common Telea Algorithm options.
Constructors
Constructor | Description |
---|---|
TeleaWatermarkOptions(Point[] mask) | Initializes a new instance of the TeleaWatermarkOptions class. |
TeleaWatermarkOptions(GraphicsPath mask) | Initializes a new instance of the TeleaWatermarkOptions class. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
mask | Point[] | The mask for the unknown area. |
TeleaWatermarkOptions(GraphicsPath mask)
public TeleaWatermarkOptions(GraphicsPath mask)
Initializes a new instance of the TeleaWatermarkOptions class.
Parameters:
Parameter | Type | Description |
---|---|---|
mask | GraphicsPath | The 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:
Parameter | Type | Description |
---|---|---|
value | int | the half patch size. |