12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using PaintDotNet.Base;
- using PaintDotNet.Data.Param;
- using System.Collections.Generic;
- namespace PaintDotNet.Data.Action
- {
- /// <summary>
- /// 亮度/对比度/伽马值
- /// </summary>
- public class Action5016 : ParamObject
- {
- public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
- {
- return Adjust.AdjustIntent.BCGTransferFunction(src, this.Lists);
- }
- public Action5016()
- {
- this.MenuId = ActionType.ActionBCG;
- this.OpenImage = "current";
- //第一个参数
- IntegerNumber one = new IntegerNumber(-100, 100);
- one.key = "Brightness";
- one.name = PdnResources.GetString("Menu.luminance.text");
- one.initialValue = 0;
- one.value = 0;
- lists.Add(one);
- //第二个参数
- DecimalNumber two = new DecimalNumber(0, 2);
- two.key = "Contrast";
- two.name = PdnResources.GetString("Menu.Contrast.text");
- two.DecimalPlaces = 1;
- two.initialValue = 1.0;
- two.value = 1.0;
- lists.Add(two);
- //第三个参数
- DecimalNumber three = new DecimalNumber(0, 2);
- three.key = "Gamma";
- three.name = PdnResources.GetString("Menu.Gammavalue.text");
- three.DecimalPlaces = 1;
- three.initialValue = 1.0;
- three.value = 1.0;
- lists.Add(three);
- }
- }
- }
|