This is a plugin for CamanJS which is a JavaScript library for canvas/image manipulation. The plugin gives CamanJS ability to apply a LUT (Lookup Table) to a canvas image.
To apply a LUT on your canvas, you just need to pass directly the file location of the LUT file. e.g. (test.CUBE)
/lut/test.cube
- Include
bundle.js
andcaman.lut.js
fromdist
folder in your HTML after including CamanJS' latest bundle. - Simply use the
lut(lutFile)
function like any other CamanJS filter or plugin.
var lutFile = '/lut/test.cube'; // should be accessible in your web server
Caman('#lut-preview', function () {
this.revert(true); // update the canvas' context
this.lut(lutFile); // apply LUT
this.render(); // render back to canvas with ID #lut-preview
});
CamanJS LUT Plugin - This one works with passing an base 64 data from image as an argument.
apply-cube-lut - The bundle.js
file is a browserified module coming from this awesome work.