@udarrr/template-matcher
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -16,10 +16,7 @@ "use strict"; | ||
else { | ||
let mat = await new image_reader_class_1.default().readToMat(image); | ||
if (!roi) { | ||
return { data: mat, rect: null }; | ||
return { data: await new image_reader_class_1.default().readToMat(image), rect: null }; | ||
} | ||
else { | ||
const screenPic = await nut_js_1.screen.grabRegion(roi); | ||
const rect = (0, image_processor_class_1.determineROI)(screenPic, roi); | ||
return { data: mat.getRegion(rect), rect: rect }; | ||
return { data: await (0, image_processor_class_1.fromImageWithAlphaChannel)(await (0, nut_js_1.imageResource)(image), roi), rect: null }; | ||
} | ||
@@ -45,5 +42,4 @@ } | ||
else { | ||
const screenPic = await nut_js_1.screen.grabRegion(roi); | ||
const rect = (0, image_processor_class_1.determineROI)(screenPic, roi); | ||
return { data: mat.getRegion(rect), rect: rect, pixelDensity: screenPic.pixelDensity }; | ||
const imageObj = await (0, nut_js_1.imageResource)(image); | ||
return { data: await (0, image_processor_class_1.fromImageWithAlphaChannel)(imageObj, roi), rect: null, pixelDensity: imageObj.pixelDensity }; | ||
} | ||
@@ -50,0 +46,0 @@ } |
{ | ||
"name": "@udarrr/template-matcher", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"main": "dist/index", | ||
@@ -9,3 +9,3 @@ "typings": "dist/index", | ||
"name": "Simon Hofmann & Siarhei Kliushnikau", | ||
"email": "kontakt@s1h.org", | ||
"email": "kontakt@s1h.org, sergey.klyshnikov2@gmail.com", | ||
"url": "https://s1h.org" | ||
@@ -12,0 +12,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106207
1004