@midscene/shared 0.12.9-beta-20250324113701.0 → 0.13.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/es/img.js +1 -1
- package/dist/lib/img.js +1 -1
- package/package.json +1 -1
- package/src/extractor/client-extractor.ts +2 -1
- package/src/img/transform.ts +1 -1
package/dist/es/img.js
CHANGED
|
@@ -96,7 +96,7 @@ async function resizeImg(inputData, newSize) {
|
|
|
96
96
|
if (newSize.width === width && newSize.height === height) {
|
|
97
97
|
return inputData;
|
|
98
98
|
}
|
|
99
|
-
image.resize(newSize.width, newSize.height, Jimp.
|
|
99
|
+
image.resize(newSize.width, newSize.height, Jimp.RESIZE_NEAREST_NEIGHBOR);
|
|
100
100
|
image.quality(90);
|
|
101
101
|
const resizedBuffer = await image.getBufferAsync(Jimp.MIME_JPEG);
|
|
102
102
|
debugImg(`resizeImg done, target size: ${newSize.width}x${newSize.height}`);
|
package/dist/lib/img.js
CHANGED
|
@@ -150,7 +150,7 @@ async function resizeImg(inputData, newSize) {
|
|
|
150
150
|
if (newSize.width === width && newSize.height === height) {
|
|
151
151
|
return inputData;
|
|
152
152
|
}
|
|
153
|
-
image.resize(newSize.width, newSize.height, Jimp.
|
|
153
|
+
image.resize(newSize.width, newSize.height, Jimp.RESIZE_NEAREST_NEIGHBOR);
|
|
154
154
|
image.quality(90);
|
|
155
155
|
const resizedBuffer = await image.getBufferAsync(Jimp.MIME_JPEG);
|
|
156
156
|
debugImg(`resizeImg done, target size: ${newSize.width}x${newSize.height}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ElementInfo } from './';
|
|
2
2
|
import { NodeType } from './constants';
|
|
3
|
-
import { midsceneGenerateHash } from './util';
|
|
3
|
+
import { generateId, midsceneGenerateHash } from './util';
|
|
4
4
|
|
|
5
|
+
// https://github.com/appium/appium/tree/master/packages/universal-xml-plugin
|
|
5
6
|
// Definition of NodeDescriptor interface
|
|
6
7
|
interface NodeDescriptor {
|
|
7
8
|
node: globalThis.Node;
|
package/src/img/transform.ts
CHANGED
|
@@ -85,7 +85,7 @@ export async function resizeImg(
|
|
|
85
85
|
return inputData;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
image.resize(newSize.width, newSize.height, Jimp.
|
|
88
|
+
image.resize(newSize.width, newSize.height, Jimp.RESIZE_NEAREST_NEIGHBOR);
|
|
89
89
|
image.quality(90);
|
|
90
90
|
const resizedBuffer = await image.getBufferAsync(Jimp.MIME_JPEG);
|
|
91
91
|
debugImg(`resizeImg done, target size: ${newSize.width}x${newSize.height}`);
|