Class ContentAwareFillWatermarkOptions

Class ContentAwareFillWatermarkOptions

ชื่อพื้นที่: Aspose.Imaging.Watermark.Options การประกอบ: Aspose.Imaging.dll (25.4.0)

ตัวเลือก Algorithm 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

ตัวอย่างนี้แสดงให้เห็นวิธีการลบวัตถุใด ๆ จากภาพโดยใช้ Graphics Path ด้วย Algorithm Fill Content Aware

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

รับหรือตั้งพื้นที่ที่จะใช้ patches

public Rectangle InterestArea { get; set; }

คุณสมบัติมูลค่า

Rectangle

MaxPaintingAttempts

ได้รับหรือตั้งค่าจํานวนสูงสุดของการพยายามวาดภาพอัลgorithm จะเลือกตัวเลือกที่ดีที่สุด

public int MaxPaintingAttempts { get; set; }

คุณสมบัติมูลค่า

int

Examples

ตัวอย่างนี้แสดงให้เห็นวิธีการลบวัตถุใด ๆ จากภาพโดยใช้ Graphics Path ด้วย Algorithm Fill Content Aware

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

ได้รับหรือตั้งค่าขนาด patch (ควรจะแปลกใจ)

public byte PatchSize { get; set; }

คุณสมบัติมูลค่า

byte

 แบบไทย