CamanJS is very easy to extend with new filters and plugins, and it comes with a wide array of image editing functionality, which is only growing as the community makes more plugins.
For more information, I highly recommend taking a look at the official website where there is more comprehensive documentation and interactive demos. You can also read the wiki for some basic information about the project and how to use it.
In order to run CamanJS in Node, we need to simulate the HTML canvas. Because of that, there are a few dependencies:
- cairo >= 1.10.0
- Beware: the version in Homebrew is not up to date.
- libjpeg
- node-canvas
npm install caman
It will install the node-canvas dependency if you don't have it installed already.
Using CamanJS is simple. It goes something like this:var Caman = require('caman').Caman; Caman('path/to/image.jpg', function () { this.brightness(10); this.contrast(-5); this.saturation(-50); // and so on... this.render(function () { /* * Currently only supports writing to PNG files. * 2nd parameter forces CamanJS to overwrite the output * file if it already exists. */ this.save("path/to/output.png", true); }); });
- Ryan LeFevre - Project Creator, Maintainer, and Lead Developer
- Rick Waldron - Plugin Architect and Developer
- Cezar S‡ Espinola - Developer
- Jarques Pretorius - Logo Designer