{"_id":"node-resemble-js","_rev":"17-8dcce6986af133cd5beb3f1e2e75f812","name":"node-resemble-js","description":"Image analysis and comparison for nodejs","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.4":{"name":"node-resemble-js","version":"0.0.4","description":"Image analysis and comparison for nodejs","main":"resemble.js","repository":{"type":"git","url":"https://github.com/lksv/node-resemble.js.git"},"keywords":["comparison","image","diff","compare"],"author":{"name":"Lukas Svoboda","email":"lukas.svoboda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/lksv/node-resemble.js/issues"},"homepage":"https://github.com/lksv/node-resemble.js","dependencies":{"pngjs":"~0.4.0"},"gitHead":"bbe89b08bab7433332c04ef1cad6f7dc3c9b368c","_id":"node-resemble-js@0.0.4","scripts":{},"_shasum":"92174823b86a45d3e227c7e193016c57b640931e","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"lksv","email":"lukas.svoboda@gmail.com"},"maintainers":[{"name":"lksv","email":"lukas.svoboda@gmail.com"}],"dist":{"shasum":"92174823b86a45d3e227c7e193016c57b640931e","tarball":"https://registry.npmjs.org/node-resemble-js/-/node-resemble-js-0.0.4.tgz","integrity":"sha512-2rk/qzKzMDe9Lu5zXxJrKQFlyqR04Ygb0ZqngFetwZOJtF4FhrQWLTMafEQtYV+mZcXlhynxRafHUh2/py2xPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgrLqvnjIbrABSVp1dPR79Rkuxs89mmw4yPfaAU1AQRAIhAKokkN8AkbxQzmkFHdjVt3wPYIJWWmqAARGSooQjN2BG"}]}},"0.0.5":{"name":"node-resemble-js","version":"0.0.5","description":"Image analysis and comparison for nodejs","main":"resemble.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"https://github.com/lksv/node-resemble.js.git"},"keywords":["comparison","image","diff","compare"],"author":{"name":"Lukas Svoboda","email":"lukas.svoboda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/lksv/node-resemble.js/issues"},"homepage":"https://github.com/lksv/node-resemble.js","dependencies":{"pngjs":"~2.2.0"},"devDependencies":{"gulp":"3.9.0","gulp-jasmine":"2.2.1","gulp-util":"3.0.7"},"gitHead":"bd72e685b3c53b192c50ae8c17d696e429ad03b5","_id":"node-resemble-js@0.0.5","_shasum":"acb3b158e0b16a241a86ec893be1dfc7d3334764","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"lksv","email":"lukas.svoboda@gmail.com"},"maintainers":[{"name":"lksv","email":"lukas.svoboda@gmail.com"}],"dist":{"shasum":"acb3b158e0b16a241a86ec893be1dfc7d3334764","tarball":"https://registry.npmjs.org/node-resemble-js/-/node-resemble-js-0.0.5.tgz","integrity":"sha512-7+dZQ7MejFQKT8oxhNx28JzFW46UBRMTpp4sPpekP6fxtvYqkjdqZv6BmkNFk0K+dpdkSdATMdZFMPJ531SIOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfbVDZTbfHTOrfUTJFJ1+eVkQF6tBnLQhlGwHeP76bQwIhALNIXOcZZKKzV8K8M3QayzGPe125hvuLjuq0aHjmWCbh"}]}},"0.1.1":{"name":"node-resemble-js","version":"0.1.1","description":"Image analysis and comparison for nodejs","main":"resemble.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"git+https://github.com/lksv/node-resemble.js.git"},"keywords":["comparison","image","diff","compare"],"author":{"name":"Lukas Svoboda","email":"lukas.svoboda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/lksv/node-resemble.js/issues"},"homepage":"https://github.com/lksv/node-resemble.js","dependencies":{"pngjs":"~2.2.0","jpeg-js":"0.2.0"},"devDependencies":{"gulp":"3.9.0","gulp-jasmine":"2.2.1","gulp-util":"3.0.7"},"gitHead":"9ae2b421d989c41c61a7da95c6ec116323424c1b","_id":"node-resemble-js@0.1.1","_shasum":"ff07d4c9d314f235828d30899b1de5999f7305a5","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"lksv","email":"lukas.svoboda@gmail.com"},"maintainers":[{"name":"lksv","email":"lukas.svoboda@gmail.com"}],"dist":{"shasum":"ff07d4c9d314f235828d30899b1de5999f7305a5","tarball":"https://registry.npmjs.org/node-resemble-js/-/node-resemble-js-0.1.1.tgz","integrity":"sha512-ex2EA0e0mJtcGf+jL3j3pZWpuTyGzNEBzr5BviHKJuQrLsTP95JDDYn1GtVswiQaOVakeqpVBtHPF8wl1d/nbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGL0rN8o3VGD9QvPVeYYhT3aEaw9BAgUSzGtssajJE7rAiEAzX6PImi2dfT1qgm88rDPwr5d3yB2iKDP3WnahWHDyKA="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/node-resemble-js-0.1.1.tgz_1470768001615_0.08492505038157105"}},"0.2.0":{"name":"node-resemble-js","version":"0.2.0","description":"Image analysis and comparison for nodejs","main":"resemble.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"git+https://github.com/lksv/node-resemble.js.git"},"keywords":["comparison","image","diff","compare"],"author":{"name":"Lukas Svoboda","email":"lukas.svoboda@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/lksv/node-resemble.js/issues"},"homepage":"https://github.com/lksv/node-resemble.js","dependencies":{"pngjs":"~2.2.0","jpeg-js":"0.2.0"},"devDependencies":{"gulp":"3.9.0","gulp-jasmine":"2.2.1","gulp-util":"3.0.7"},"gitHead":"5cc719bb619d82100cb4d34345a4b12144bf1470","_id":"node-resemble-js@0.2.0","_shasum":"8a36c6678a61e5d8455fec58009b1b0271b1909a","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"lksv","email":"lukas.svoboda@gmail.com"},"maintainers":[{"name":"lksv","email":"lukas.svoboda@gmail.com"}],"dist":{"shasum":"8a36c6678a61e5d8455fec58009b1b0271b1909a","tarball":"https://registry.npmjs.org/node-resemble-js/-/node-resemble-js-0.2.0.tgz","integrity":"sha512-n/JE5kvqCEv+gX+Ej2XQQE9DOBpF92XdiNAb/01XWUtT8XmpI5de+Zc8blUGhKtpNZy0ygrW7NsfHoaIieGPjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsyYCsb3z2ogi0e0JN3BmmRdH8m7ugYaxa/mOXd+gCHAiEAwLOyN05THbl1jZDWGwy4ARzbuIco3GhaT2kOz9MwrIE="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/node-resemble-js-0.2.0.tgz_1480020730367_0.17979165050201118"}}},"readme":"node-resemble.js\n================\n\nAnalyse and compare images with Javascript. This project does not need canvas or any other binary denpendencies.\nIt is a modification of [Resemble.js](https://github.com/Huddle/Resemble.js)\n\n\n### Get it\n\n`npm install node-resemble-js`\n\n### Example\n\nRetrieve basic analysis on image.\n\n```javascript\nvar api = resemble(fileData).onComplete(function(data){\n\tconsole.log(data);\n\t/*\n\t{\n\t  red: 255,\n\t  green: 255,\n\t  blue: 255,\n\t  brightness: 255\n\t}\n\t*/\n});\n```\n\nUse resemble to compare two images.\n\n```javascript\nvar diff = resemble(file).compareTo(file2).ignoreColors().onComplete(function(data){\n\tconsole.log(data);\n\t/*\n\t{\n\t  misMatchPercentage : 100, // %\n\t  isSameDimensions: true, // or false\n\t  dimensionDifference: { width: 0, height: -1 }, // defined if dimensions are not the same\n\t  getImageDataUrl: function(){}\n\t}\n\t*/\n});\n```\n\nYou can also change the comparison method after the first analysis.\n\n```javascript\n// diff.ignoreNothing();\n// diff.ignoreColors();\ndiff.ignoreAntialiasing();\n```\n\nAnd change the output display style.\n\n```javascript\nresemble.outputSettings({\n  errorColor: {\n    red: 255,\n    green: 0,\n    blue: 255\n  },\n  errorType: 'movement',\n  transparency: 0.3\n});\n// resembleControl.repaint();\n```\n\n--------------------------------------\n## Example usuage (in cucumber step definition)\n\n\n     this.Then(/^Screenshot should match image \"(.*)\"$/, function (image, callback) {\n        browser.takeScreenshot().then(function(pngString) {\n          var screenshot = new Buffer(pngString, 'base64');\n     \n          resemble(image)\n            .compareTo(screenshot)\n            .onComplete(function(data){\n     \n              if (Number(data.misMatchPercentage) <= 0.01) {\n                callback();\n              } else {\n                data.getDiffImage().pack().pipe(fs.createWriteStream(image + 'diff.png'));\n                callback.fail(new Error(\"Screenshot '\" + image+  \"' differ \" + data.misMatchPercentage + \"%\"));\n              }\n            });\n        });\n      })\n\n--------------------------------------\n\nCredits:\n * Created by [James Cryer](http://github.com/jamescryer) and the Huddle development team.\n * [Lukas Svoboda](http://github.com/lksv) - modification for node.js\n","maintainers":[{"name":"lksv","email":"lukas.svoboda@gmail.com"}],"time":{"modified":"2022-06-21T21:01:47.720Z","created":"2014-09-19T14:47:04.561Z","0.0.4":"2014-09-19T14:47:04.561Z","0.0.5":"2016-01-12T08:25:54.655Z","0.1.0":"2016-08-09T18:35:41.004Z","0.1.1":"2016-08-09T18:40:03.718Z","0.2.0":"2016-11-24T20:52:12.689Z"},"homepage":"https://github.com/lksv/node-resemble.js","keywords":["comparison","image","diff","compare"],"repository":{"type":"git","url":"git+https://github.com/lksv/node-resemble.js.git"},"author":{"name":"Lukas Svoboda","email":"lukas.svoboda@gmail.com"},"bugs":{"url":"https://github.com/lksv/node-resemble.js/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mimmo1":true,"jamesjnadeau":true,"igorpupkinable":true,"dbuggerx":true,"zvr":true,"sergets":true,"pbhawsar":true,"zalithka":true}}