Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

#watermark-best-corner

A node.js script to calculate the best corner to apply watermark in a image. The script uses the color similarity to determine the best corner to apply watermark. The script will return NorthEast, NorthWest, SouthEast or SouthWest. The return could be used as 'gravity' parameter of imagemagick.


###Requirement

  • ImageMagick is 6.8.9+

##How to use

Require lib

var corner = require('./lib/corner');

Send a image to corner function

request({
    url: encodeURI('http://www.website.com/image.jpg')
  })
  .on('response', function (img) {
    corner(img, function (c) {
      console.log(c);
    });
  });

Or try a command line

node app.js -u http://guiadossolteiros.com/wp-content/uploads/2013/08/mulher-lavando-carro-520x245.jpg

About

A node.js script to calculate the best corner to watermark a image

Resources

License

Releases

No releases published

Packages

No packages published