commit b9a4db7fb997ef7c665bfccb992503d04f03f924
parent 876363050943837f1cec4fac7e97bb7c96e4a7f9
Author: Mattias Andrée <maandree@kth.se>
Date: Sat, 21 Jan 2017 13:29:56 +0100
Add blind-colour-ciexyz
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat:
5 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
@@ -3,6 +3,7 @@ include $(CONFIGFILE)
BIN =\
blind-arithm\
+ blind-colour-ciexyz\
blind-colour-srgb\
blind-concat\
blind-crop\
diff --git a/man/blind-colour-ciexyz.1 b/man/blind-colour-ciexyz.1
@@ -0,0 +1,26 @@
+.TH BLIND-COLOUR-CIEXYZ 1 blind
+.SH NAME
+blind-colour-ciexyz - Convert CIE XYZ for use with blind-single-colour(1)
+.SH SYNOPSIS
+.B blind-colour-ciexyz
+.RI ( X
+.I Y
+.I Z
+|
+.IR Y )
+.SH DESCRIPTION
+.B blind-colour-ciexyz
+prints the given input as is. If
+.BR blind-single-colour (1)
+is modified in the future to use another colour model
+than CIE XYZ,
+.B blind-colour-ciexyz
+will be modified to convert the values to
+that colour model. If only
+.I Y
+is specified, the colour will be CIE Standard Illuminant D65-grey
+with a luminosity of
+.IR Y .
+.SH AUTHORS
+Mattias Andree
+.RI < maandree@kth.se >
diff --git a/man/blind-colour-srgb.1 b/man/blind-colour-srgb.1
@@ -1,6 +1,6 @@
.TH BLIND-COLOUR-SRGB 1 blind
.SH NAME
-blind-colour-srgb - Convert sRGB to CIE XYZ
+blind-colour-srgb - Convert sRGB for use with blind-single-colour(1)
.SH SYNOPSIS
.B blind-colour-srgb
[-d
@@ -19,6 +19,13 @@ and
values to CIE XYZ and prints the result to stdout
in plain text, such that it can be used with
.BR blind-single-colour (1).
+If
+.BR blind-single-colour (1)
+is modified in the future to use another colour
+model than CIE XYZ,
+.B blind-colour-srgb
+will be modified to convert the values into
+that colour model.
.P
.IR red ,
.IR green ,
diff --git a/man/blind-single-colour.1 b/man/blind-single-colour.1
@@ -55,6 +55,13 @@ The width of the video, in pixels.
.TP
.BR -h " "\fIheight\fP
The height of the video, in pixels.
+.SH NOTES
+.B blind-single-colour
+may be changed in the future to use some other colour model,
+therefore, it is recommended to also use
+.BR blind-colour-ciexyz (1)
+if you are specifying the colour in CIE XYZ. If however
+your values are colour space-agnostic, you should not.
.SH AUTHORS
Mattias Andree
.RI < maandree@kth.se >
diff --git a/src/blind-colour-ciexyz.c b/src/blind-colour-ciexyz.c
@@ -0,0 +1,23 @@
+/* See LICENSE file for copyright and license details. */
+#include "util.h"
+
+USAGE("(X Y Z | Y)")
+
+int
+main(int argc, char *argv[])
+{
+ ARGBEGIN {
+ default:
+ usage();
+ } ARGEND;
+
+ if (argc == 1)
+ printf("%s\n", argv[0]);
+ else if (argc == 3)
+ printf("%s %s %s\n", argv[0], argv[1], argv[2]);
+ else
+ usage();
+
+ efshut(stdout, "<stdout>");
+ return 0;
+}