From d2ebf39ac29e5e4fb629a2887cba754a9b525104 Mon Sep 17 00:00:00 2001 From: Rommel Santor Date: Fri, 27 Jul 2018 07:09:37 -0700 Subject: [PATCH] Add misMatchThreshold example to README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4236724..0eb9780 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,13 @@ The resemble.compare API provides a convenience function that is used as follows const compare = require("resemblejs").compare; function getDiff() { - const options = {}; + const options = { + // stop comparing once determined to be > 5% non-matching; this will + // also enable compare-only mode and no output image will be rendered; + // the combination of these results in a significant speed-up in batch processing + misMatchThreshold: 5 + }; + // The parameters can be Node Buffers // data is the same as usual with an additional getBuffer() function compare(image1, image2, options, function(err, data) {