camanjs-lut

1.0.0 • Public • Published

CamanJS LUT File Plugin

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

How to use

  • Include bundle.js and caman.lut.js from dist 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
});

Other Plugin

CamanJS LUT Plugin - This one works with passing an base 64 data from image as an argument.

Credits

apply-cube-lut - The bundle.js file is a browserified module coming from this awesome work.

Keywords

none

Install

DownloadsWeekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

97.8 kB

Total Files

8

Last publish

Collaborators

  • metabolic119