10

I have read the ColorMatrix documentation and it says the following:

5x4 matrix for transforming the color+alpha components of a Bitmap.

The matrix is stored in a single array and its treated as follows:

[ 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 (after clamping)

  • R' = aR + bG + cB + dA + e;
  • G' = fR + gG + hB + iA + j;
  • B' = kR + lG + mB + nA + o;
  • A' = pR + qG + rB + sA + t;

I know how to get the result but I still have some questions:

  1. What is the value of color [r, g, b, a], is color [r, g, b, a] calculated by system?
  2. I know that a d c d and so on can be negative values. What is the difference between positive values and negative values.
  3. I have no graphic knowledge it is very hard to get a satisfactory image, I have to usual try many times to get a good result. Are there any tools or website that can give some guidance on how to get the valve of [a b c d..t] possibly with examples?

1 Answer 1

8

If I'm guessing right you want some information about color matrices. I've found some sites that explain it in detail.

It's not Android or Java related but it should be usefull to get the point across.

1
  • It is not available in Android or Java. How it is useful for a android developer ? Commented Oct 21, 2015 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.