TeleaWatermarkOptions
Contenu
[
Cacher
]Inheritance: java.lang.Object, com.aspose.imaging.watermark.options.WatermarkOptions
public class TeleaWatermarkOptions extends WatermarkOptions
Les options communes de l’algorithme Telea.
Constructeurs
| Constructeur | Description |
|---|---|
| TeleaWatermarkOptions(Point[] mask) | Initialise une nouvelle instance de la classe TeleaWatermarkOptions. |
| TeleaWatermarkOptions(GraphicsPath mask) | Initialise une nouvelle instance de la classe TeleaWatermarkOptions. |
Méthodes
| Méthode | Description |
|---|---|
| getHalfPatchSize() | Obtient la moitié de la taille du patch. |
| setHalfPatchSize(int value) | Définit la moitié de la taille du patch. |
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)
Initialise une nouvelle instance de la classe TeleaWatermarkOptions.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| mask | Point[] | Le masque pour la zone inconnue. |
TeleaWatermarkOptions(GraphicsPath mask)
public TeleaWatermarkOptions(GraphicsPath mask)
Initialise une nouvelle instance de la classe TeleaWatermarkOptions.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| mask | GraphicsPath | Le masque pour la zone inconnue. |
getHalfPatchSize()
public final int getHalfPatchSize()
Obtient la moitié de la taille du patch.
Valeur : la taille du patch.
Returns: int - la moitié de la taille du patch.
setHalfPatchSize(int value)
public final void setHalfPatchSize(int value)
Définit la moitié de la taille du patch.
Valeur : la taille du patch.
Parameters:
| Paramètre | Type | Description |
|---|---|---|
| valeur | int | la moitié de la taille du patch. |