From f6b8e0eae4374f339487a33e3e4fe5462d5816e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 25 Nov 2017 10:16:00 +0100 Subject: New upstream version 2.0.0 --- xicc/specplot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 xicc/specplot.c (limited to 'xicc/specplot.c') diff --git a/xicc/specplot.c b/xicc/specplot.c old mode 100644 new mode 100755 index 9e43856..de819ed --- a/xicc/specplot.c +++ b/xicc/specplot.c @@ -21,6 +21,7 @@ #include #include +#include "cgats.h" #include "xspect.h" #include "numlib.h" #include "plot.h" @@ -112,10 +113,17 @@ static int do_spec( || mt == inst_mrt_emission_flash || mt == inst_mrt_ambient_flash) { - /* Compute XYZ of illuminant */ - if (icx_ill_sp2XYZ(xyz, icxOT_CIE_1931_2, NULL, icxIT_custom, 0, &tsp) != 0) + /* Compute absolute XYZ of illuminant */ + if (icx_ill_sp2XYZ(xyz, icxOT_CIE_1931_2, NULL, icxIT_custom, 0, &tsp, 1) != 0) warning("icx_ill_sp2XYZ returned error"); + printf("Abs. Y = %f\n", xyz[1]); + + /* Normalise to Y = 1 */ + xyz[0] /= xyz[1]; + xyz[2] /= xyz[1]; + xyz[1] /= xyz[1]; + icmXYZ2Yxy(Yxy, xyz); icmXYZ2Lab(&icmD50, Lab, xyz); -- cgit v1.2.3