@midscene/shared 0.30.1 → 0.30.2-beta-20250930144216.0
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.
- package/dist/types/img/info.d.ts +1 -5
- package/package.json +1 -1
- package/src/img/info.ts +1 -6
- package/src/types/index.ts +3 -3
package/dist/types/img/info.d.ts
CHANGED
package/package.json
CHANGED
package/src/img/info.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
import { Buffer } from 'node:buffer';
|
|
3
3
|
import type Jimp from 'jimp';
|
|
4
|
+
import type { Size } from '../types';
|
|
4
5
|
import getJimp from './get-jimp';
|
|
5
6
|
|
|
6
|
-
export interface Size {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
dpr?: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
7
|
export interface ImageInfo extends Size {
|
|
13
8
|
jimpImage: Jimp;
|
|
14
9
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface Point {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface Size {
|
|
10
|
-
width: number; //
|
|
11
|
-
height: number;
|
|
12
|
-
dpr?: number; //
|
|
10
|
+
width: number; // The image sent to AI model will be resized to this width, also the coordinates in the action space will be scaled to the range [0, width]. Usually you should set it to the logical pixel size
|
|
11
|
+
height: number; // The image sent to AI model will be resized to this height, also the coordinates in the action space will be scaled to the range [0, height]. Usually you should set it to the logical pixel size
|
|
12
|
+
dpr?: number; // this is deprecated, do NOT use it
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type Rect = Point & Size & { zoom?: number };
|