apply-cube-lut
Apply a Cube (IRIDAS/Adobe) LUT to an image
Applies a Cube LUT to an image. See parse-cube-lut for Cube LUT parsing.
LUT files are useful for color grading, encapsulating complex color-space transforms or emulating film stock for photography and video.
Example
Photograph transformed with a Fuji 400H stock emulation LUT.
Install
$ npm install apply-cube-lut
Usage
var applyCubeLUT = ;var parseCubeLUT = ;var ndarrayFromImage = ;var canvasFromNdarray = ;var ops = ; var lutURL = 'test.cube';var imgURL = 'test.jpg'; var req = ;var img = ; req { img { // once both the image and LUT data are loaded var lut = ; var arr = ; // convert RGBA components to 0.0 -> 1.0 ops; // apply LUT ; // convert back to 0.0 -> 255.0 ops; // display transformed image var canvas = ; documentbody; }; imgsrc = imgURL;}; req;req;