aboutsummaryrefslogtreecommitdiffstats
path: root/libcolour_srgb_encode.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_srgb_encode.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_srgb_encode.3')
-rw-r--r--libcolour_srgb_encode.335
1 files changed, 35 insertions, 0 deletions
diff --git a/libcolour_srgb_encode.3 b/libcolour_srgb_encode.3
new file mode 100644
index 0000000..37b7585
--- /dev/null
+++ b/libcolour_srgb_encode.3
@@ -0,0 +1,35 @@
+.TH LIBCOLOUR_SRGB_ENCODE 3 libcolour
+.SH NAME
+libcolour_srgb_encode - Apply the sRGB transfer function
+.SH SYNOPSIS
+.nf
+#include <libcolour.h>
+
+float \fBlibcolour_srgb_encode_f\fP(float \fIvalue\fP);
+double \fBlibcolour_srgb_encode_lf\fP(double \fIvalue\fP);
+long double \fBlibcolour_srgb_encode_llf\fP(long double \fIvalue\fP);
+
+#define \fBlibcolour_srgb_encode\fP(\fIvalue\fP)\\
+ (_Generic((\fIvalue\fP),\\
+ float: \fBlibcolour_srgb_encode_f\fP(\fIvalue\fP),\\
+ double: \fBlibcolour_srgb_encode_lf\fP(\fIvalue\fP),\\
+ long double: \fBlibcolour_srgb_encode_llf\fP(\fIvalue\fP)))
+.fi
+.SH DESCRIPTION
+.B libcolour_srgb_encode
+and its non-generic functions apply the sRGB transfer
+function to a
+.IR value .
+If
+.I value
+is negative, the transfer function is applied to the
+absolute value of
+.I value
+and the negative of the result is returned.
+.SH SEE ALSO
+.BR libcolour (7),
+.BR libcolour_srgb_decode (3),
+.BR LIBCOLOUR_SRGB (7)
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree@kth.se >