Class ContentAwareFillWatermarkOptions

Class ContentAwareFillWatermarkOptions

Le nom : Aspose.Imaging.Watermark.Options Assemblée: Aspose.Imaging.dll (25.4.0)

Le contenu courant Aware Fill algorithme options.

public class ContentAwareFillWatermarkOptions : WatermarkOptions

Inheritance

object WatermarkOptions ContentAwareFillWatermarkOptions

I membri ereditari

WatermarkOptions.Mask , WatermarkOptions.PrecalculationProgressEventHandler , WatermarkOptions.GraphicsPathMask , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

L’exemple montre comment supprimer un objet de l’image en utilisant Graphics Path avec le contenu conscient de remplir un algorithme.

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 ContentAwareFillWatermarkOptions(mask) 
                                                                                                                               { 
                                                                                                                                   MaxPaintingAttempts = 4
                                                                                                                               };

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

                                                                                                                               result.Save(outputPath);
                                                                                                                           }

Constructors

ContentAwareFillWatermarkOptions(Point[])

Initialisez une nouvelle instance de la catégorie Aspose.Imaging.Watermark.Options.ContentAwareFillWtermarkOption.

public ContentAwareFillWatermarkOptions(Point[] mask)

Parameters

mask Point [ ]

Le masque pour la zone inconnue.

ContentAwareFillWatermarkOptions(GraphicsPath)

Initialisez une nouvelle instance de la catégorie Aspose.Imaging.Watermark.Options.ContentAwareFillWtermarkOption.

public ContentAwareFillWatermarkOptions(GraphicsPath mask)

Parameters

mask GraphicsPath

Le masque pour la zone inconnue.

Properties

InterestArea

Obtenez ou mettez la zone pour prendre des patches.

public Rectangle InterestArea { get; set; }

Valore di proprietà

Rectangle

MaxPaintingAttempts

Obtenez ou fixez le nombre maximum de tentatives de peinture.L’algorithme choisit la meilleure variante.

public int MaxPaintingAttempts { get; set; }

Valore di proprietà

int

Examples

L’exemple montre comment supprimer un objet de l’image en utilisant Graphics Path avec le contenu conscient de remplir un algorithme.

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 ContentAwareFillWatermarkOptions(mask) 
                                                                                                                               { 
                                                                                                                                   MaxPaintingAttempts = 4
                                                                                                                               };

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

                                                                                                                               result.Save(outputPath);
                                                                                                                           }

PatchSize

Obtenez ou fixez la taille du patch (il doit être étrange).

public byte PatchSize { get; set; }

Valore di proprietà

byte

 Français