{"id":13447633,"url":"https://github.com/imgly/rembrandt","last_synced_at":"2025-03-22T01:31:11.167Z","repository":{"id":37677668,"uuid":"71865321","full_name":"imgly/rembrandt","owner":"imgly","description":"Image comparison using node-canvas","archived":true,"fork":false,"pushed_at":"2023-01-11T22:29:14.000Z","size":3575,"stargazers_count":292,"open_issues_count":16,"forks_count":18,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-04-27T00:07:35.656Z","etag":null,"topics":["canvas","image-comparison","javascript","testing"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imgly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-25T06:12:41.000Z","updated_at":"2024-04-18T06:25:08.000Z","dependencies_parsed_at":"2023-02-09T08:30:31.596Z","dependency_job_id":null,"html_url":"https://github.com/imgly/rembrandt","commit_stats":null,"previous_names":["imgly/rembrandt"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Frembrandt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Frembrandt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Frembrandt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Frembrandt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgly","download_url":"https://codeload.github.com/imgly/rembrandt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244893424,"owners_count":20527587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","image-comparison","javascript","testing"],"created_at":"2024-07-31T05:01:22.988Z","updated_at":"2025-03-22T01:31:10.707Z","avatar_url":"https://github.com/imgly.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/imgly/rembrandt\"\u003e\n    \u003cimg src=\"https://img.shields.io/travis/imgly/rembrandt.svg\" alt=\"TravisCI Status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pesdk-slack.herokuapp.com/\"\u003e\n    \u003cimg src=\"https://pesdk-slack.herokuapp.com/badge.svg\" alt=\"Slack Status\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Rembrandt.JS - Client- and server-side image comparison library\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://s3.amazonaws.com/pesdk/rembrandt.png\" alt=\"Rembrandt\" /\u003e\n\u003c/p\u003e\n\nRembrandt.JS is a image comparison library that works both with the\nHTML5 Canvas2D API as well as the drop-in Node.JS replacement\n`node-canvas`.\n\nWe created Rembrandt.JS to have an easy-to-use image comparison\nlibrary for our internal tests for [PhotoEditorSDK](https://www.photoeditorsdk.com/?utm_campaign=Projects\u0026utm_source=Github\u0026utm_medium=Side_Projects\u0026utm_content=Rembrandt\u0026utm_term=HTML5).\nGo check it out. It's really awesome. :)\n\n### Installation\n\n#### Node.JS\n\nPlease follow the installation instructions over at [node-canvas](https://github.com/Automattic/node-canvas#installation)\nin order to correctly install all required system libraries. Afterwards, just run:\n\n`npm install rembrandt`\n\n#### Browser\n\nDownload the latest build from our [Releases page](https://github.com/imgly/rembrandt/releases), then\ninclude it like this:\n\n```html\n\u003cscript src=\"/path/to/rembrandt.min.js\"\u003e\u003c/script\u003e\n```\n\nThe `Rembrandt` JavaScript variable is now globally available.\n\n#### Using module bundlers like Webpack etc.\n\nInstall Rembrandt via `npm install rembrandt`, then require it inside your JavaScript like so:\n\n```js\nvar Rembrandt = require('rembrandt/build/browser')\n```\n\n### Usage\n\nHere is an example (ES6 / ES2015):\n\n```js\nimport Rembrandt from 'rembrandt'\n\nconst rembrandt = new Rembrandt({\n  // `imageA` and `imageB` can be either Strings (file path on node.js,\n  // public url on Browsers) or Buffers\n  imageA: '/path/to/imageA',\n  imageB: fs.readFileSync('/path/to/imageB'),\n\n  // Needs to be one of Rembrandt.THRESHOLD_PERCENT or Rembrandt.THRESHOLD_PIXELS\n  thresholdType: Rembrandt.THRESHOLD_PERCENT,\n\n  // The maximum threshold (0...1 for THRESHOLD_PERCENT, pixel count for THRESHOLD_PIXELS\n  maxThreshold: 0.01,\n\n  // Maximum color delta (0...1):\n  maxDelta: 0.02,\n\n  // Maximum surrounding pixel offset\n  maxOffset: 0,\n\n  renderComposition: true, // Should Rembrandt render a composition image?\n  compositionMaskColor: Rembrandt.Color.RED // Color of unmatched pixels\n})\n\n// Run the comparison\nrembrandt.compare()\n  .then(function (result) {\n    console.log('Passed:', result.passed)\n    console.log('Pixel Difference:', result.differences, 'Percentage Difference', result.percentageDifference, '%')\n    console.log('Composition image buffer:', result.compositionImage)\n\n    // Note that `compositionImage` is an Image when Rembrandt.js is run in the browser environment\n  })\n  .catch((e) =\u003e {\n    console.error(e)\n  })\n```\n\n### License\nSee [LICENSE.md](LICENSE.md)\n\n### Authors and Contributors\nCopyright (c) 2016 by [PhotoEditorSDK.com](https://www.photoeditorsdk.com/?utm_campaign=Projects\u0026utm_source=Github\u0026utm_medium=Side_Projects\u0026utm_content=Rembrandt\u0026utm_term=HTML5)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgly%2Frembrandt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgly%2Frembrandt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgly%2Frembrandt/lists"}