Skip to content

Add more complex pixel transformations #70

Description

@TimoZikeli

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!

Activity

  1. dbouron commented on Nov 1, 2020

    @dbouron
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions