Open Seikon opened 7 years ago
Seems developers forgot to add Caman.Convert declaration in their code, so it should look like Caman.Convert =Convert = (function() {.....
then something like
Caman = require('caman.full.js').Caman;
Convert = Caman.Convert;
Caman.Filter.register('someFilter', function () {
this.process('someFilter', function (rgba) {
var hsv = Convert.rgbToHSV(rgba.r, rgba.g, rgba.b);
var out= Convert.hsvToRGB(hsv.h, hsv.s, hsv.v);
}
// Return the modified RGB values
return out;
});
});
Hi!
I am trying to convert an image from rgb to hsv using Caman.Convert, but i don't find enough documentation how to use it and import the needed modules.
Can anyone show an example of how to use Caman.Convert?
Thank you.