Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more complex pixel transformations #70

Open
TimoZikeli opened this issue Oct 29, 2020 · 1 comment
Open

Add more complex pixel transformations #70

TimoZikeli opened this issue Oct 29, 2020 · 1 comment

Comments

@TimoZikeli
Copy link

TimoZikeli commented Oct 29, 2020

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!

@dbouron
Copy link
Contributor

dbouron commented Nov 1, 2020

Hello,
I see, we have to check first how we can do that with libvips in C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants