Action5016.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using PaintDotNet.Base;
  2. using PaintDotNet.Data.Param;
  3. using System.Collections.Generic;
  4. namespace PaintDotNet.Data.Action
  5. {
  6. /// <summary>
  7. /// 亮度/对比度/伽马值
  8. /// </summary>
  9. public class Action5016 : ParamObject
  10. {
  11. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  12. {
  13. return Adjust.AdjustIntent.BCGTransferFunction(src, this.Lists);
  14. }
  15. public Action5016()
  16. {
  17. this.MenuId = ActionType.ActionBCG;
  18. this.OpenImage = "current";
  19. //第一个参数
  20. IntegerNumber one = new IntegerNumber(-100, 100);
  21. one.key = "Brightness";
  22. one.name = PdnResources.GetString("Menu.luminance.text");
  23. one.initialValue = 0;
  24. one.value = 0;
  25. lists.Add(one);
  26. //第二个参数
  27. DecimalNumber two = new DecimalNumber(0, 2);
  28. two.key = "Contrast";
  29. two.name = PdnResources.GetString("Menu.Contrast.text");
  30. two.DecimalPlaces = 1;
  31. two.initialValue = 1.0;
  32. two.value = 1.0;
  33. lists.Add(two);
  34. //第三个参数
  35. DecimalNumber three = new DecimalNumber(0, 2);
  36. three.key = "Gamma";
  37. three.name = PdnResources.GetString("Menu.Gammavalue.text");
  38. three.DecimalPlaces = 1;
  39. three.initialValue = 1.0;
  40. three.value = 1.0;
  41. lists.Add(three);
  42. }
  43. }
  44. }