diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-03 20:38:41 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-03 20:38:41 +0100 |
commit | ba627dd9ecb578e9852c7b9cce67ec63199d1acf (patch) | |
tree | 27c4258311ca8c8ed7ff67a8a0bc7280e8fcae79 /xicc/specplot.c | |
parent | 69aec3b712232e93600ecd741269fed1f90b412a (diff) | |
parent | 3abb40d43649adb3807180692d8579c405524675 (diff) |
Merge branch 'release/2.0.0+repack-1'2.0.0+repack-1
Diffstat (limited to 'xicc/specplot.c')
-rwxr-xr-x[-rw-r--r--] | xicc/specplot.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xicc/specplot.c b/xicc/specplot.c index 9e43856..de819ed 100644..100755 --- a/xicc/specplot.c +++ b/xicc/specplot.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <math.h> +#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); |