use adb to take screenshot

This commit is contained in:
Lei PAN
2023-10-23 16:44:53 +02:00
parent 8f8e1c5f87
commit a36a9cf7cb
3 changed files with 23 additions and 11 deletions
+9 -3
View File
@@ -72,9 +72,15 @@ const BRAVE_SKIP_PRIVACY_PAGE_2 = "Partagez des renseignements"
async function convertImageToWhiteBlack(image_path, device) {
console.log("convertImageToWhiteBlack for " + device.serial())
const image = await Jimp.read(image_path);
image.grayscale().write(image_path + ".wb");
return image_path + ".wb";
try {
const image = await Jimp.read(image_path);
image.grayscale().write(image_path + ".wb");
return image_path + ".wb";
} catch (e) {
console.log(e)
return image_path
}
}
class OCRChecker {