Action5015.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using PaintDotNet.Base;
  2. using PaintDotNet.Data.Param;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. namespace PaintDotNet.Data.Action
  8. {
  9. /// <summary>
  10. /// 色度/饱和度/亮度
  11. /// </summary>
  12. public class Action5015 : ParamObject
  13. {
  14. public override OpenCvSharp.Mat PerformProcess(OpenCvSharp.Mat src)
  15. {
  16. return Adjust.AdjustIntent.BshTransferFunction(src, this.Lists);
  17. }
  18. public Action5015()
  19. {
  20. this.MenuId = ActionType.ActionHSB;
  21. this.OpenImage = "current";
  22. //第一个参数
  23. IntegerNumber one = new IntegerNumber(0, 200);
  24. one.key = "Hue";
  25. one.name = PdnResources.GetString("Menu.ImageProcessing.adjust.Chroma.text");
  26. one.initialValue = 100;
  27. one.value = 100;
  28. lists.Add(one);
  29. //第二个参数
  30. IntegerNumber two = new IntegerNumber(0, 200);
  31. two.key = "Saturation";
  32. two.name = PdnResources.GetString("Menu.saturation.text");
  33. two.initialValue = 100;
  34. two.value = 100;
  35. lists.Add(two);
  36. //第三个参数
  37. IntegerNumber three = new IntegerNumber(0, 200);
  38. three.key = "Brightness";
  39. three.name = PdnResources.GetString("Menu.luminance.text");
  40. three.initialValue = 100;
  41. three.value = 100;
  42. lists.Add(three);
  43. }
  44. }
  45. }