Reputation: 4318
Is it possible to modify image gamma or curves using KineticJS? I need those tools to modify canvas. The documentation says nothing about that (see Filters), but maybe I can do it not directly?
Upvotes: 0
Views: 69
Reputation: 105015
No, KineticJS does not currently have a Gamma filter.
You have a couple of good workarounds:
Option#1
If you are familiar with creating filters, you can fairly easily add a gamma filter to KineticJS.
The existing KineticJS filters just do getImageData+putImageData to directly modify the pixels: https://github.com/ericdrowell/KineticJS/tree/master/src/filters
Option#2
CamanJS is a canvas image library that does a nice job of applying filters: http://camanjs.com/examples/
You can easily use CamanJS with KineticJS as described in my previous answer: KineticJS canvas modified by CamanJS
Upvotes: 1