Action5013.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 Action5013 : ParamObject
  10. {
  11. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  12. {
  13. return Adjust.AdjustIntent.ColorBalanceFunction(src, this.Lists);
  14. }
  15. public Action5013()
  16. {
  17. this.MenuId = ActionType.ActionColorBalance;
  18. this.OpenImage = "current";
  19. //第一个参数
  20. IntegerNumber one = new IntegerNumber(-100, 100);
  21. one.key = "Red";
  22. one.name = PdnResources.GetString("Menu.hong.Text");
  23. one.initialValue = 0;
  24. one.value = 0;
  25. lists.Add(one);
  26. //第二个参数
  27. IntegerNumber two = new IntegerNumber(-100, 100);
  28. two.key = "Green";
  29. two.name = PdnResources.GetString("Menu.lv.Text");
  30. two.initialValue = 0;
  31. two.value = 0;
  32. lists.Add(two);
  33. //第三个参数
  34. IntegerNumber three = new IntegerNumber(-100, 100);
  35. three.key = "Blue";
  36. three.name = PdnResources.GetString("Menu.lan.Text");
  37. three.initialValue = 0;
  38. three.value = 0;
  39. lists.Add(three);
  40. }
  41. }
  42. }