Class FeatheringSettings
Class FeatheringSettings
نام ها : Aspose.Imaging.MagicWand.ImageMasks جمع آوری: Aspose.Imaging.dll (25.4.0)
یک کلاس تنظیمات است.
public class FeatheringSettings
Inheritance
اعضای ارثی
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
نمونه نشان می دهد که چگونه می توان یک منطقه پیچیده از یک تصویر را با استفاده از ابزار Magic Wand انتخاب کرد و توانایی تعامل با ماسک ها (invert، union، substract) را نشان داد.
var imageFilePath = "input.png";
using (RasterImage image = (RasterImage)Image.Load(inputFilePath))
{
// Create a new mask using magic wand tool based on tone and color of pixel (845, 128)
MagicWandTool.Select(image, new MagicWandSettings(845, 128))
// Union the existing mask with the specified one created by magic wand tool
.Union(new MagicWandSettings(416, 387))
// Invert the existing mask
.Invert()
// Subtract the specified mask created by magic wand tool with specified threshold from the existing one
.Subtract(new MagicWandSettings(1482, 346) { Threshold = 69 })
// Subtract four specified rectangle masks from the existing mask one by one
.Subtract(new RectangleMask(0, 0, 800, 150))
.Subtract(new RectangleMask(0, 380, 600, 220))
.Subtract(new RectangleMask(930, 520, 110, 40))
.Subtract(new RectangleMask(1370, 400, 120, 200))
// Feather mask with specified settings
.GetFeathered(new FeatheringSettings() { Size = 3 })
// Apply mask to the image
.Apply();
// Save image
image.Save(outputFilePath);
}
Constructors
FeatheringSettings()
public FeatheringSettings()
Properties
Mode
دریافت یا تنظیم حالت الگوریتم ضربه زدن.
public FeatheringMode Mode { get; set; }
ارزش املاک
Size
به اندازه یا اندازه آن را تعیین می کند.
public int Size { get; set; }