Skip to content

Navigation Menu

Sign in
    • GitHub Copilot
      Write better code with AI
    • Security
      Find and fix vulnerabilities
    • Actions
      Automate any workflow
    • Codespaces
      Instant dev environments
    • Issues
      Plan and track work
    • Code Review
      Manage code changes
    • Discussions
      Collaborate outside of code
    • Code Search
      Find more, search less
    Explore
    • All features
    • Documentation
    • GitHub Skills
    • Blog
  • By company size
    • Enterprises
    • Small and medium teams
    • Startups
    • Nonprofits
    By use case
    • DevSecOps
    • DevOps
    • CI/CD
    • View all use cases
    By industry
    • Healthcare
    • Financial services
    • Manufacturing
    • Government
    • View all industries
    View all solutions
  • Topics
    • AI
    • DevOps
    • Security
    • Software Development
    • View all
    Explore
    • Learning Pathways
    • Events & Webinars
    • Ebooks & Whitepapers
    • Customer Stories
    • Partners
    • Executive Insights
    • GitHub Sponsors
      Fund open source developers
    • The ReadME Project
      GitHub community articles
    Repositories
    • Topics
    • Trending
    • Collections
    • Enterprise platform
      AI-powered developer platform
    Available add-ons
    • Advanced Security
      Enterprise-grade security features
    • GitHub Copilot
      Enterprise-grade AI features
    • Premium Support
      Enterprise-grade 24/7 support
  • Pricing

Search code, repositories, users, issues, pull requests...

Clear
    Search syntax tips

    Provide feedback

    We read every piece of feedback, and take your input very seriously.

    Saved searches

    Use saved searches to filter your results more quickly

    To see all available qualifiers, see our documentation.

    Sign in
    Sign up
    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
    kensplanet / node-resemble.js Public
    forked from lksv/node-resemble.js
    • Notifications You must be signed in to change notification settings
    • Fork 0
    • Star 0

    LOOKING FOR MAINTAINER - Image analysis and comparison

    License

    MIT, MIT licenses found

    Licenses found

    MIT
    LICENSE
    MIT
    LICENSE.Resemblejs
    0 stars 426 forks Branches Tags Activity
    Star
    Notifications You must be signed in to change notification settings
    • Code
    • Pull requests 0
    • Actions
    • Projects 0
    • Wiki
    • Security
    • Insights
    Additional navigation options
    • Code
    • Pull requests
    • Actions
    • Projects
    • Wiki
    • Security
    • Insights

    kensplanet/node-resemble.js

    BranchesTags
     
     

    Folders and files

    NameName
    Last commit message
    Last commit date

    Latest commit

     Cannot retrieve latest commit at this time.

    History

    58 Commits
    example
    example
     
     
    libs/twitter-bootstrap
    libs/twitter-bootstrap
     
     
    .gitignore
    .gitignore
     
     
    .npmignore
    .npmignore
     
     
    CHANGELOG.md
    CHANGELOG.md
     
     
    LICENSE
    LICENSE
     
     
    LICENSE.Resemblejs
    LICENSE.Resemblejs
     
     
    README.md
    README.md
     
     
    gulpfile.js
    gulpfile.js
     
     
    package.json
    package.json
     
     
    resemble.js
    resemble.js
     
     
    resemble.spec.js
    resemble.spec.js
     
     

    Repository files navigation

    • README
    • MIT license
    • MIT license

    node-resemble.js

    Analyse and compare images with Javascript. This project does not need canvas or any other binary denpendencies. It is a modification of Resemble.js

    Get it

    npm install node-resemble-js

    Example

    Retrieve basic analysis on image.

    var api = resemble(fileData).onComplete(function(data){
    	console.log(data);
    	/*
    	{
    	  red: 255,
    	  green: 255,
    	  blue: 255,
    	  brightness: 255
    	}
    	*/
    });

    Use resemble to compare two images.

    var diff = resemble(file).compareTo(file2).ignoreColors().onComplete(function(data){
    	console.log(data);
    	/*
    	{
    	  misMatchPercentage : 100, // %
    	  isSameDimensions: true, // or false
    	  dimensionDifference: { width: 0, height: -1 }, // defined if dimensions are not the same
    	  getImageDataUrl: function(){}
    	}
    	*/
    });

    You can also change the comparison method after the first analysis.

    // diff.ignoreNothing();
    // diff.ignoreColors();
    diff.ignoreAntialiasing();

    And change the output display style.

    resemble.outputSettings({
      errorColor: {
        red: 255,
        green: 0,
        blue: 255
      },
      errorType: 'movement',
      transparency: 0.3
    });
    // resembleControl.repaint();

    Example usuage (in cucumber step definition)

     this.Then(/^Screenshot should match image "(.*)"$/, function (image, callback) {
        browser.takeScreenshot().then(function(pngString) {
          var screenshot = new Buffer(pngString, 'base64');
     
          resemble(image)
            .compareTo(screenshot)
            .onComplete(function(data){
     
              if (Number(data.misMatchPercentage) <= 0.01) {
                callback();
              } else {
                data.getDiffImage().pack().pipe(fs.createWriteStream(image + 'diff.png'));
                callback.fail(new Error("Screenshot '" + image+  "' differ " + data.misMatchPercentage + "%"));
              }
            });
        });
      })
    

    Credits:

    • Created by James Cryer and the Huddle development team.
    • Lukas Svoboda - modification for node.js

    About

    LOOKING FOR MAINTAINER - Image analysis and comparison

    Resources

    Readme

    License

    MIT, MIT licenses found

    Licenses found

    MIT
    LICENSE
    MIT
    LICENSE.Resemblejs
    Activity

    Stars

    0 stars

    Watchers

    2 watching

    Forks

    0 forks
    Report repository

    Releases

    3 tags

    Packages 0

    No packages published

    Languages

    • JavaScript 100.0%

    Footer

    © 2025 GitHub, Inc.

    Footer navigation

    • Terms
    • Privacy
    • Security
    • Status
    • Docs
    • Contact
    You can’t perform that action at this time.