Skip to content

[Request] ColorMatrix for Filters  #7

Description

@summers314

Hi, Im trying to make a similar library for Android. It accepts ColorMatrix of 5x4 size , but the filters & effects here are not of that format. Could you convert them to 5x4 or explain how to?

5x4 :
[ a, b, c, d, e,
f, g, h, i, j,
k, l, m, n, o,
p, q, r, s, t ]

When applied to a color [R, G, B, A], the resulting color is computed as:

R’ = a_R + b_G + c_B + d_A + e;
G’ = f_R + g_G + h_B + i_A + j;
B’ = k_R + l_G + m_B + n_A + o;
A’ = p_R + q_G + r_B + s_A + t;

That resulting color [R’, G’, B’, A’] then has each channel clamped to the 0 to 255 range.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions