aboutsummaryrefslogtreecommitdiffstats
path: root/src/libclut.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-12-02 14:37:39 +0100
committerMattias Andrée <maandree@kth.se>2016-12-02 14:37:39 +0100
commit1757e6f6e1c92f1871b880d75982cf335a29c092 (patch)
treee6b5b0264f7f5f5b11c74119dddfe6605ddbd341 /src/libclut.c
parentAdd RGB colourspace conversion (diff)
downloadlibclut-1757e6f6e1c92f1871b880d75982cf335a29c092.tar.gz
libclut-1757e6f6e1c92f1871b880d75982cf335a29c092.tar.bz2
libclut-1757e6f6e1c92f1871b880d75982cf335a29c092.tar.xz
RGB colour space conversion
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/libclut.c')
-rw-r--r--src/libclut.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libclut.c b/src/libclut.c
index 93d0ac0..aea585e 100644
--- a/src/libclut.c
+++ b/src/libclut.c
@@ -372,17 +372,17 @@ int libclut_model_get_rgb_conversion_matrix(const libclut_rgb_colourspace_t* fro
if (!invert(M, B))
return errno = EINVAL, -1;
- M[0][0] = A[0][0] * B[0][0] + A[0][1] * B[1][0] + A[0][2] * B[2][0];
- M[0][1] = A[0][0] * B[0][1] + A[0][1] * B[1][1] + A[0][2] * B[2][1];
- M[0][2] = A[0][0] * B[0][2] + A[0][1] * B[1][2] + A[0][2] * B[2][2];
+ M[0][0] = B[0][0] * A[0][0] + B[0][1] * A[1][0] + B[0][2] * A[2][0];
+ M[0][1] = B[0][0] * A[0][1] + B[0][1] * A[1][1] + B[0][2] * A[2][1];
+ M[0][2] = B[0][0] * A[0][2] + B[0][1] * A[1][2] + B[0][2] * A[2][2];
- M[1][0] = A[1][0] * B[0][0] + A[1][1] * B[1][0] + A[1][2] * B[2][0];
- M[1][1] = A[1][0] * B[0][1] + A[1][1] * B[1][1] + A[1][2] * B[2][1];
- M[1][2] = A[1][0] * B[0][2] + A[1][1] * B[1][2] + A[1][2] * B[2][2];
+ M[1][0] = B[1][0] * A[0][0] + B[1][1] * A[1][0] + B[1][2] * A[2][0];
+ M[1][1] = B[1][0] * A[0][1] + B[1][1] * A[1][1] + B[1][2] * A[2][1];
+ M[1][2] = B[1][0] * A[0][2] + B[1][1] * A[1][2] + B[1][2] * A[2][2];
- M[2][0] = A[2][0] * B[0][0] + A[2][1] * B[1][0] + A[2][2] * B[2][0];
- M[2][1] = A[2][0] * B[0][1] + A[2][1] * B[1][1] + A[2][2] * B[2][1];
- M[2][2] = A[2][0] * B[0][2] + A[2][1] * B[1][2] + A[2][2] * B[2][2];
+ M[2][0] = B[2][0] * A[0][0] + B[2][1] * A[1][0] + B[2][2] * A[2][0];
+ M[2][1] = B[2][0] * A[0][1] + B[2][1] * A[1][1] + B[2][2] * A[2][1];
+ M[2][2] = B[2][0] * A[0][2] + B[2][1] * A[1][2] + B[2][2] * A[2][2];
if (Minv != NULL)
{