Class ContentAwareFillWatermarkOptions

Class ContentAwareFillWatermarkOptions

名称: Aspose.Imaging.Watermark.Options アセンション: Aspose.Imaging.dll (25.4.0)

一般的なコンテンツ Aware Fill アルゴリズム オプション

public class ContentAwareFillWatermarkOptions : WatermarkOptions

Inheritance

object WatermarkOptions ContentAwareFillWatermarkOptions

相続人

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

例では、コンテンツの注意を満たすアルゴリズムを使用して画像からオブジェクトを削除する方法を示しています。

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[])

Aspose.Imaging.Watermark.Options.ContentAwareFillWatermarkOptionsクラスの新しい例を開始します。

public ContentAwareFillWatermarkOptions(Point[] mask)

Parameters

mask Point ( )

未知の領域のマスク

ContentAwareFillWatermarkOptions(GraphicsPath)

Aspose.Imaging.Watermark.Options.ContentAwareFillWatermarkOptionsクラスの新しい例を開始します。

public ContentAwareFillWatermarkOptions(GraphicsPath mask)

Parameters

mask GraphicsPath

未知の領域のマスク

Properties

InterestArea

受けるか、パッチを取るための領域を設定します。

public Rectangle InterestArea { get; set; }

不動産価値

Rectangle

MaxPaintingAttempts

最大数の絵画の試みを得たり設定したりします。アルゴリズムが最適な選択肢を選択します。

public int MaxPaintingAttempts { get; set; }

不動産価値

int

Examples

例では、コンテンツの注意を満たすアルゴリズムを使用して画像からオブジェクトを削除する方法を示しています。

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

パッチサイズを取得または設定します(不思議でなければなりません)。

public byte PatchSize { get; set; }

不動産価値

byte

 日本語