Add files via upload
This commit is contained in:
@@ -333,11 +333,21 @@ module.exports = function (scriptRuntime, scope) {
|
|||||||
list[i * 3 + 2] = colors.toInt(color);
|
list[i * 3 + 2] = colors.toInt(color);
|
||||||
}
|
}
|
||||||
let opt = options || {};
|
let opt = options || {};
|
||||||
|
let findAll = opt.All || false;
|
||||||
|
|
||||||
|
if (findAll) {
|
||||||
|
return Array.from(rtImages.colorFinder.findAllMultiColors(img,
|
||||||
|
colors.toInt(firstColor),
|
||||||
|
_.parseThreshold(opt),
|
||||||
|
'region' in opt ? _.buildRegion(img, opt.region) : null,
|
||||||
|
list));
|
||||||
|
} else {
|
||||||
return rtImages.colorFinder.findMultiColors(img,
|
return rtImages.colorFinder.findMultiColors(img,
|
||||||
colors.toInt(firstColor),
|
colors.toInt(firstColor),
|
||||||
_.parseThreshold(opt),
|
_.parseThreshold(opt),
|
||||||
'region' in opt ? _.buildRegion(img, opt.region) : null,
|
'region' in opt ? _.buildRegion(img, opt.region) : null,
|
||||||
list);
|
list);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
findImage(img, template, options) {
|
findImage(img, template, options) {
|
||||||
_.initIfNeeded();
|
_.initIfNeeded();
|
||||||
|
|||||||
Reference in New Issue
Block a user