JVips
JVips copied to clipboard
Add more complex pixel transformations
Hi,
It would be great to have the possibility for more complex pixel transformations than linear.
For example, for every pixel, it would be nice if it was possible to specify some 3(/4) functions r(r, g, b, [a]), g(r, g, b, [a]), b(r, g, b, [a]), a(r, g, b, a)
using linear transformation of these parameters. This would enable applying nice effects like Sepia.
Specifically. JVips could take 4 parameters for newR, newG, newB and optionally newA, each of the form
[r, g, b, a, d]
meaning:
newR = max(0, min(255, oldR*r + oldG*g + oldB*b + oldA*a + d))
(respectively for newG, newB, newA).
Thanks!
Hello, I see, we have to check first how we can do that with libvips in C