image.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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, isRaw)",
  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. "name": "isRaw",
  73. "hidden": true,
  74. "optional": true,
  75. "control": "radio",
  76. "type": "bool",
  77. "hint": {
  78. "en_US": "Whether to output raw data, set to true when using by most AI inference",
  79. "zh_CN": "输出未编码原始数据,通常 AI 推断需要原始数据"
  80. },
  81. "label": {
  82. "en_US": "Output Raw Data",
  83. "zh_CN": "输出原始数据"
  84. }
  85. }
  86. ],
  87. "outputs": [
  88. {
  89. "label": {
  90. "en_US": "Output",
  91. "zh_CN": "输出"
  92. },
  93. "value": "resize"
  94. }
  95. ],
  96. "node": {
  97. "category": "abc",
  98. "icon": "iconPath",
  99. "label": {
  100. "en_US": "resize",
  101. "zh_CN": "resize"
  102. }
  103. }
  104. }, {
  105. "name": "thumbnail",
  106. "example": "thumbnail(image,maxWidth, maxHeight)",
  107. "hint": {
  108. "en_US": "Downscales an image preserving its aspect ratio to the maximum dimensions (maxWidth, maxHeight).",
  109. "zh_CN": "将保留宽高比的图像缩小到最大尺寸(maxWidth,maxHeight)。"
  110. },
  111. "args": [
  112. {
  113. "name": "image",
  114. "hidden": true,
  115. "optional": false,
  116. "control": "text",
  117. "type": "string",
  118. "hint": {
  119. "en_US": "Input data",
  120. "zh_CN": "输入数据"
  121. },
  122. "label": {
  123. "en_US": "Input data",
  124. "zh_CN": "输入数据"
  125. }
  126. },{
  127. "name": "maxWidth",
  128. "hidden": true,
  129. "optional": false,
  130. "control": "text",
  131. "type": "int",
  132. "hint": {
  133. "en_US": "Input maxWidth",
  134. "zh_CN": "输入最大宽度"
  135. },
  136. "label": {
  137. "en_US": "Input maxWidth",
  138. "zh_CN": "输入最大宽度"
  139. }
  140. },{
  141. "name": "maxHeight",
  142. "hidden": true,
  143. "optional": false,
  144. "control": "text",
  145. "type": "int",
  146. "hint": {
  147. "en_US": "Input maxHeight",
  148. "zh_CN": "输入最大高度"
  149. },
  150. "label": {
  151. "en_US": "Input maxHeight",
  152. "zh_CN": "输入最大高度"
  153. }
  154. }
  155. ],
  156. "outputs": [
  157. {
  158. "label": {
  159. "en_US": "Output",
  160. "zh_CN": "输出"
  161. },
  162. "value": "thumbnail"
  163. }
  164. ],
  165. "node": {
  166. "category": "abc",
  167. "icon": "iconPath",
  168. "label": {
  169. "en_US": "thumbnail",
  170. "zh_CN": "thumbnail"
  171. }
  172. }
  173. }]
  174. }