@bettergi/types 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/objects/file.d.ts +21 -0
  2. package/package.json +2 -2
package/objects/file.d.ts CHANGED
@@ -49,6 +49,27 @@ declare global {
49
49
  */
50
50
  function readImageMatSync(path: string): Mat;
51
51
 
52
+ /**
53
+ * 读取Mat图片,并调整到指定尺寸
54
+ * @param path 文件路径(相对于脚本根目录)
55
+ * @param width 调整后的宽度
56
+ * @param height 调整后的高度
57
+ * @param interpolation 插值算法(默认值:1)
58
+ * - 0: 最近邻插值
59
+ * - 1: 双线性插值
60
+ * - 2: 双三次插值
61
+ * - 3: 像素区域关系重采样
62
+ * - 4: Lanczos插值
63
+ * - 5: 精确双线性插值
64
+ * @since 0.54.0
65
+ */
66
+ function readImageMatWithResizeSync(
67
+ path: string,
68
+ width: number,
69
+ height: number,
70
+ interpolation?: number
71
+ ): Mat;
72
+
52
73
  /**
53
74
  * 输出文本文件
54
75
  * @param path 文件路径(相对于脚本根目录,会自动创建目录)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bettergi/types",
3
- "version": "0.1.3",
4
- "description": "TypeScript Definitions for BetterGI JavaScript",
3
+ "version": "0.1.4",
4
+ "description": "BetterGI TypeScript 类型定义",
5
5
  "type": "module",
6
6
  "author": "Bread Grocery<https://github.com/breadgrocery>",
7
7
  "license": "MIT",