using PaintDotNet.Base; using PaintDotNet.Data.Param; using System.Collections.Generic; using System.Drawing; namespace PaintDotNet.Data.Action { /// /// 白平衡 /// public class Action5012 : ParamObject { public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src) { return Adjust.AdjustIntent.WhiteBalanceFunction(src, this.Lists); } public Action5012() { this.MenuId = ActionType.ActionWhiteBalance; this.OpenImage = "current"; ColorNumber phase0Color = new ColorNumber(); phase0Color.key = "imageColor"; phase0Color.name = PdnResources.GetString("Menu.ImageProcessing.adjust.Theoriginalcolor.text"); phase0Color.Value = Color.White.ToArgb(); phase0Color.initialValue = Color.White.ToArgb(); ColorNumber phaseColor = new ColorNumber(); phaseColor.key = "phaseColor"; phaseColor.name = PdnResources.GetString("Menu.ImageProcessing.adjust.Colorpicking.text"); phaseColor.Value = Color.White.ToArgb(); phaseColor.initialValue = Color.White.ToArgb(); ChoiseArray objectSelectA = new ChoiseArray("objectSelect", PdnResources.GetString("Menu.ImageProcessing.adjust.pattern.text"), new BooleanObject[] { new BooleanObject("1", PdnResources.GetString("Menu.automoshi.Text"), null),//item1 new BooleanObject("2", PdnResources.GetString("Menu.ImageProcessing.adjust.Colorpicking.text"), new Args[]//item2 { phaseColor }), new BooleanObject("3", PdnResources.GetString("Menu.ImageProcessing.adjust.Theoriginalcolor.text"), new Args[]//item3 { phase0Color }) } ); objectSelectA.initialValue = 1; objectSelectA.value = 1; lists.Add(objectSelectA); } } }