aboutsummaryrefslogtreecommitdiffstats
path: root/libcolour_delta_e.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-06-10 10:48:21 +0200
committerMattias Andrée <maandree@kth.se>2017-06-10 10:48:21 +0200
commit42ca750430bf40ba13493ac46028d22e6f3555b9 (patch)
tree04324f1e954990175dc7922c46da26855a4b5a92 /libcolour_delta_e.3
parentReduce size of RGB struct, and add LIBCOLOUR_CIELCHUV.7 and LIBCOLOUR_RGB.7 (diff)
downloadlibcolour-42ca750430bf40ba13493ac46028d22e6f3555b9.tar.gz
libcolour-42ca750430bf40ba13493ac46028d22e6f3555b9.tar.bz2
libcolour-42ca750430bf40ba13493ac46028d22e6f3555b9.tar.xz
m + add libcolour_delta_e.3, libcolour_srgb_decode.3, and libcolour_srgb_encode.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libcolour_delta_e.3')
-rw-r--r--libcolour_delta_e.342
1 files changed, 42 insertions, 0 deletions
diff --git a/libcolour_delta_e.3 b/libcolour_delta_e.3
new file mode 100644
index 0000000..84e9d7c
--- /dev/null
+++ b/libcolour_delta_e.3
@@ -0,0 +1,42 @@
+.TH LIBCOLOUR_DELTA_E 3 libcolour
+.SH NAME
+libcolour_delta_e - Calculate the delta E*_ab distance
+.SH SYNOPSIS
+.nf
+#include <libcolour.h>
+
+int \fBlibcolour_delta_e_f\fP(const libcolour_colour_f_t *\fIa\fP,
+ const libcolour_colour_f_t *\fIb\fP, float *\fIresult\fP);
+int \fBlibcolour_delta_e_lf\fP(const libcolour_colour_lf_t *\fIa\fP,
+ const libcolour_colour_lf_t *\fIb\fP, double *\fIresult\fP);
+int \fBlibcolour_delta_e_llf\fP(const libcolour_colour_llf_t *\fIa\fP,
+ const libcolour_colour_llf_t *\fIb\fP, long double *\fIresult\fP);
+
+#define \fBlibcolour_delta_e\fP(\fIa\fP, \fIb\fP, \fIresult\fP)\\
+ (_Generic((\fIa\fP),\\
+ const libcolour_colour_f_t *: \fBlibcolour_delta_e_f\fP(\fIa\fP, \fIb\fP, \fIresult\fP),\\
+ const libcolour_colour_lf_t *: \fBlibcolour_delta_e_lf\fP(\fIa\fP, \fIb\fP, \fIresult\fP),\\
+ const libcolour_colour_llf_t *: \fBlibcolour_delta_e_llf\fP(\fIa\fP, \fIb\fP, \fIresult\fP)))
+.fi
+.SH DESCRIPTION
+.B libcolour_delta_e
+and its non-generic functions calculate the delta E*_ab
+.RB [ _
+denotes that the following characters shall be subscripted]
+(the distance in CIE L*a*b*) of two colours, and stores the
+distance in
+.IR *result .
+.SH RETURN VALUES
+Upon successful completion, the functions returns 0.
+Otherwise the function return -1 with
+.I errno
+set to indicate the error.
+.SH ERRORS
+These functions fail if and only if
+.BR libcolour_convert (3)
+fails.
+.SH SEE ALSO
+.BR libcolour (7)
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree@kth.se >