image.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. {
  2. "about": {
  3. "trial": false,
  4. "author": {
  5. "name": "EMQ",
  6. "email": "contact@emqx.io",
  7. "company": "EMQ Technologies Co., Ltd",
  8. "website": "https://www.emqx.io"
  9. },
  10. "helpUrl": {
  11. "en_US": "https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/sqls/custom_functions.md",
  12. "zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/sqls/custom_functions.md"
  13. },
  14. "description": {
  15. "en_US": "",
  16. "zh_CN": ""
  17. }
  18. },
  19. "libs": ["github.com/nfnt/resize@master"],
  20. "name": "image",
  21. "functions": [{
  22. "name": "resize",
  23. "example": "resize(image,width, height)",
  24. "hint": {
  25. "en_US": "Creates a scaled image with new dimensions (width, height) .If either width or height is set to 0, it will be set to an aspect ratio preserving value.",
  26. "zh_CN": "创建具有新尺寸(宽度,高度)的缩放图像。如果width或height设置为0,则将其设置为长宽比保留值。"
  27. },
  28. "args": [
  29. {
  30. "name": "image",
  31. "hidden": true,
  32. "optional": false,
  33. "control": "text",
  34. "type": "string",
  35. "hint": {
  36. "en_US": "Input data",
  37. "zh_CN": "输入数据"
  38. },
  39. "label": {
  40. "en_US": "Input data",
  41. "zh_CN": "输入数据"
  42. }
  43. },{
  44. "name": "width",
  45. "hidden": true,
  46. "optional": false,
  47. "control": "text",
  48. "type": "int",
  49. "hint": {
  50. "en_US": "Input width",
  51. "zh_CN": "输入宽度"
  52. },
  53. "label": {
  54. "en_US": "Input width",
  55. "zh_CN": "输入宽度"
  56. }
  57. },{
  58. "name": "height",
  59. "hidden": true,
  60. "optional": false,
  61. "control": "text",
  62. "type": "int",
  63. "hint": {
  64. "en_US": "Input height",
  65. "zh_CN": "输入高度"
  66. },
  67. "label": {
  68. "en_US": "Input height",
  69. "zh_CN": "输入高度"
  70. }
  71. }
  72. ],
  73. "outputs": [
  74. {
  75. "label": {
  76. "en_US": "Output",
  77. "zh_CN": "输出"
  78. },
  79. "value": "resize"
  80. }
  81. ],
  82. "node": {
  83. "category": "abc",
  84. "icon": "iconPath",
  85. "label": {
  86. "en_US": "resize",
  87. "zh_CN": "resize"
  88. }
  89. }
  90. }, {
  91. "name": "thumbnail",
  92. "example": "thumbnail(image,maxWidth, maxHeight)",
  93. "hint": {
  94. "en_US": "Downscales an image preserving its aspect ratio to the maximum dimensions (maxWidth, maxHeight).",
  95. "zh_CN": "将保留宽高比的图像缩小到最大尺寸(maxWidth,maxHeight)。"
  96. },
  97. "args": [
  98. {
  99. "name": "image",
  100. "hidden": true,
  101. "optional": false,
  102. "control": "text",
  103. "type": "string",
  104. "hint": {
  105. "en_US": "Input data",
  106. "zh_CN": "输入数据"
  107. },
  108. "label": {
  109. "en_US": "Input data",
  110. "zh_CN": "输入数据"
  111. }
  112. },{
  113. "name": "maxWidth",
  114. "hidden": true,
  115. "optional": false,
  116. "control": "text",
  117. "type": "int",
  118. "hint": {
  119. "en_US": "Input maxWidth",
  120. "zh_CN": "输入最大宽度"
  121. },
  122. "label": {
  123. "en_US": "Input maxWidth",
  124. "zh_CN": "输入最大宽度"
  125. }
  126. },{
  127. "name": "maxHeight",
  128. "hidden": true,
  129. "optional": false,
  130. "control": "text",
  131. "type": "int",
  132. "hint": {
  133. "en_US": "Input maxHeight",
  134. "zh_CN": "输入最大高度"
  135. },
  136. "label": {
  137. "en_US": "Input maxHeight",
  138. "zh_CN": "输入最大高度"
  139. }
  140. }
  141. ],
  142. "outputs": [
  143. {
  144. "label": {
  145. "en_US": "Output",
  146. "zh_CN": "输出"
  147. },
  148. "value": "thumbnail"
  149. }
  150. ],
  151. "node": {
  152. "category": "abc",
  153. "icon": "iconPath",
  154. "label": {
  155. "en_US": "thumbnail",
  156. "zh_CN": "thumbnail"
  157. }
  158. }
  159. }]
  160. }