Skip to content

playsignage/node-resemble-v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-resemble-v2

A new Node port of Resemble.js v2 (original source node-resemble)

##Installation

$ npm i node-resemble-v2

##Prerequisites

Cairo is required for node-canvas, installation instructions can be found node-canvas Wiki.

##Example

var fs = require('fs');

var resemble = require('node-resemble-v2');

var github_img1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAAJlQTFRFJiYmJiYmJSUlJiYmKysrJiYmJSUlJiYmJSUlJCQkJiYmJycnJiYmJiYmJSUlJiYmJSUlJiYmJSUlJCQkJycnJCQkJycnJiYmJSUlJiYmJiYmJycnJiYmJiYmJSUlJycnJycnJCQkJSUlJiYmJiYmJycnJiYmJycnJiYmJSUlJiYmJiYmJycnJiYmEhISISEhJycnAAAAJiYmQmWwmAAAADJ0Uk5T9JNotgyiTK2KR0P7Zij+PYni/StBMdmBpKnq5tbw1VXsKu9RUM3O7cl8V5ql3w42+gB0ejcrAAAApElEQVQY012PRRIEMQwDs8zMOAzhyP9/3CYDl9XJ7irZEoOXldo5LW2YGWAUlVwIXpIyAZi6ytAor2rjgao2pgXjpFJglvLLdrbez4eT1TIny2QJS50WKCXTHLceDMA1cwLXHsQQjrkIhx4wRC5YRj2og0UW2Ll2P05RSP82g72/iJ6PMzL/FipOgIJIA6cQzEdPBT7eAZE20UO5b7jy7sr91f8BZR4qkBlEJUYAAAAASUVORK5CYII=';

var github_img2 = fs.readFileSync('./example.png');

resemble(github_img1).onComplete(function(data){
    console.log(data);
});

resemble(github_img1).compareTo(github_img2).onComplete(function(data){
    console.log(data);
});

About

Node api for Resemble.js (v2)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%