diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:24:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:24:58 +0200 |
commit | 3db384424bd7398ffbb7a355cab8f15f3add009f (patch) | |
tree | 4536961c62454aca3ac87ee88229e4d20c0d44fa /tweak | |
parent | d479dd1aab1c1cb907932c6595b0ef33523fc797 (diff) |
New upstream version 1.9.1+repackupstream/1.9.1+repack
Diffstat (limited to 'tweak')
-rw-r--r-- | tweak/refine.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/tweak/refine.c b/tweak/refine.c index 6e06882..4bcdfbb 100644 --- a/tweak/refine.c +++ b/tweak/refine.c @@ -78,7 +78,6 @@ #include "numlib.h" #include "rspl.h" #include "xicc.h" -#include "xicc.h" #include "ui.h" #define COMPLOOKUP /* Compound with previous in ICM lookup rather than rspl */ @@ -388,10 +387,20 @@ main(int argc, char *argv[]) { spec = 1; tillum = icxIT_F10; } else { /* Assume it's a filename */ + inst_meas_type mt; + spec = 1; tillum = icxIT_custom; - if (read_xspect(&cust_tillum, na) != 0) - usage("Unable to read custom spectrum '%s'",na); + if (read_xspect(&cust_tillum, &mt, na) != 0) + usage("Unable to read target spectrum '%s'",na); + + if (mt != inst_mrt_none + && mt != inst_mrt_emission + && mt != inst_mrt_ambient + && mt != inst_mrt_emission_flash + && mt != inst_mrt_ambient_flash) { + error("Target illuminant '%s' is wrong measurement type",na); + } } } } @@ -425,10 +434,20 @@ main(int argc, char *argv[]) { spec = 1; illum = icxIT_F10; } else { /* Assume it's a filename */ + inst_meas_type mt; + spec = 1; illum = icxIT_custom; - if (read_xspect(&cust_illum, na) != 0) + if (read_xspect(&cust_illum, &mt, na) != 0) usage("Unable to read custom spectrum '%s'",na); + + if (mt != inst_mrt_none + && mt != inst_mrt_emission + && mt != inst_mrt_ambient + && mt != inst_mrt_emission_flash + && mt != inst_mrt_ambient_flash) { + error("CIE illuminant '%s' is wrong measurement type",na); + } } } |