Giter Site home page Giter Site logo

node-resemble's Introduction

node-resemble

Request for maintainer: #11

Node port of Resemble.js.

Analyse and compare images with Javascript and HTML5. Resemble.js Demo

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
	  getImageDataUrl: function(){} // returns base64-encoded image
	  pngStream: function(){} // returns stream with image data
	  getBuffer: function(cb){} // calls callback with image buffer
	}
	*/
});

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

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

Created by James Cryer and the Huddle development team.

node-resemble's People

Contributors

erykpiast avatar fredyc avatar kpdecker avatar night avatar richardowen avatar snollygolly avatar tojocky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-resemble's Issues

Transfer ownership

I'm not longer able to maintain this project and would like to transfer the ownership of the npm module and the repository to anyone who is interested in maintaining it. Please respond here if interested in taking on this responsibility.

Support native Resemble's largeImageThreshold option

Hey there - thanks for making such a great port. I've had various issues with other ResembleJS -> Node ports and settled on this package, but one issue comes up: my use case requires diff files with no visual artifacts so I rely on the largeImageThreshold setting (or rather, I rely on my ability to disable it). From looking through the source, it looks like you've removed largeImageThreshold in order to simplify the logic around the skip variable. How hard would it be to add this setting back in? I can manually change the package code in the meantime, but would rather not rely on that long-term, and suspect other users may be in the same boat.

Thanks in advance!

Rename + deprecated

I've had some confusion between this package and others. The reason for this is that the name within the package.json does not match the name of the repo. node-resemble in npm is actually a completely different repo.

Could the name of this repo be renamed?

I suspect simply resemble is an option, but this is too like resemblejs. so perhaps a complete rename to resemble-node, ensuring that the package.json matches it?

It would also help to add a deprecated notice so other don't accidentally fall into the same problem.

Segmentation fault

Hi

When i'm trying to compare 2 images the nodejs process exiting with this error:

Segmentation fault (core dumped)

how can i fix this?

getImageDataUrl doesn't exist on the diff data object

getImageDataUrl doesn't exist on the diff data object. I get
{ isSameDimensions: false,
dimensionDifference: { width: 0, height: -154 },
misMatchPercentage: '22.48',
analysisTime: 346,
getDiffImage: [Function] }
}

It looks like getDiffImage, returns a node stream... But I'm unable to write it to a file... could you give an example?

resemble vs node-resemble

I've been getting confused between these two packages.

it looks like node-resemble is the preferred method?

Bump graceful-fs dependency

graceful-fs versions lower than v4 reevaluate native fs module source, which is not supported.
You should update your graceful-fs dependency to v4 or later.

Tracking issue: nodejs/node#5213.

publish a new version?

I see a PR (#12) has gone in which has not yet been published.

I understand the PR is no longer maintained, but a new version would be gratefully received!

I see there was an offer to help with maintenance, did that go anywhere? Would it be helpful to have multiple maintainers? I'd be happy to put my name into the hat also.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.