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 --- tweak/Jamfile | 2 ++ tweak/License.txt | 0 tweak/Readme.txt | 0 tweak/afiles | 0 tweak/refine.c | 32 +++++++++++++++++++++----------- 5 files changed, 23 insertions(+), 11 deletions(-) mode change 100644 => 100755 tweak/Jamfile mode change 100644 => 100755 tweak/License.txt mode change 100644 => 100755 tweak/Readme.txt mode change 100644 => 100755 tweak/afiles mode change 100644 => 100755 tweak/refine.c (limited to 'tweak') diff --git a/tweak/Jamfile b/tweak/Jamfile old mode 100644 new mode 100755 index c788adf..fd168f5 --- a/tweak/Jamfile +++ b/tweak/Jamfile @@ -21,6 +21,8 @@ LINKLIBS = ../icc/libicc ../xicc/libxicc ../cgats/libcgats ../numlib/libnum ../plot/libplot ../plot/libvrml ../numlib/libui $(LibWin) ; +LINKFLAGS += $(GUILINKFLAGS) ; + # Profile refiner Main refine : refine.c ; diff --git a/tweak/License.txt b/tweak/License.txt old mode 100644 new mode 100755 diff --git a/tweak/Readme.txt b/tweak/Readme.txt old mode 100644 new mode 100755 diff --git a/tweak/afiles b/tweak/afiles old mode 100644 new mode 100755 diff --git a/tweak/refine.c b/tweak/refine.c old mode 100644 new mode 100755 index 4bcdfbb..c9e16bd --- a/tweak/refine.c +++ b/tweak/refine.c @@ -175,7 +175,7 @@ void usage(char *diag, ...) { fprintf(stderr," -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n"); fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n"); fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n"); - fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n"); + fprintf(stderr," 1931_2, 1964_10, 2012_2 (def), 2012_10, S&B 1955_2, shaw, J&V 1978_2 or file.cmf\n"); fprintf(stderr," cietarget Target CIE or spectral values, CGATS file (e.g. .ti3)\n"); fprintf(stderr," ciecurrent Actual CIE or spectral values, CGATS file (e.g. .ti3)\n"); fprintf(stderr," [outdevicc] Output device ICC profile to set gamut limit (not used if -g)\n"); @@ -276,7 +276,8 @@ main(int argc, char *argv[]) { xspect cust_tillum, *tillump = NULL; /* Custom target/simulated illumination spectrum */ icxIllumeType illum = icxIT_D50; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType observ = icxOT_Judd_Voss_2; + icxObserverType obType = icxOT_CIE_2012_2; + xspect custObserver[3]; /* If obType = icxOT_custom */ callback cb; /* Callback support stucture for setting abstract profile */ icmFile *rd_fp = NULL; /* Existing abstract profile to modify */ @@ -457,21 +458,30 @@ main(int argc, char *argv[]) { if (na == NULL) usage("Expected argument to -o"); if (strcmp(na, "1931_2") == 0) { /* Classic 2 degree */ spec = 1; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } else if (strcmp(na, "1964_10") == 0) { /* Classic 10 degree */ spec = 1; - observ = icxOT_CIE_1964_10; + obType = icxOT_CIE_1964_10; + } else if (strcmp(na, "2012_2") == 0) { /* Latest 2 degree */ + spec = 1; + obType = icxOT_CIE_2012_2; + } else if (strcmp(na, "2012_10") == 0) { /* Latest 10 degree */ + spec = 1; + obType = icxOT_CIE_2012_10; } else if (strcmp(na, "1955_2") == 0) { /* Stiles and Burch 1955 2 degree */ spec = 1; - observ = icxOT_Stiles_Burch_2; + obType = icxOT_Stiles_Burch_2; } else if (strcmp(na, "1978_2") == 0) { /* Judd and Voss 1978 2 degree */ spec = 1; - observ = icxOT_Judd_Voss_2; + obType = icxOT_Judd_Voss_2; } else if (strcmp(na, "shaw") == 0) { /* Shaw and Fairchilds 1997 2 degree */ spec = 1; - observ = icxOT_Shaw_Fairchild_2; - } else - usage("Unrecogised argument '%s' to -o",na); + obType = icxOT_Shaw_Fairchild_2; + } else { /* Assume it's a filename */ + obType = icxOT_custom; + if (read_cmf(custObserver, na) != 0) + usage(0,"Failed to read custom observer CMF from -o file '%s'",na); + } } else @@ -537,7 +547,7 @@ main(int argc, char *argv[]) { printf("No CIE data found, switching to spectral with standard observer & D50 for file '%s'\n",cg[n].name); spec = 1; illum = icxIT_D50; - observ = icxOT_CIE_1931_2; + obType = icxOT_CIE_1931_2; } if (spec && cgf->find_kword(cgf, 0, "SPECTRAL_BANDS") < 0) error ("No spectral data data found in file '%s' when spectral expected",cg[n].name); @@ -662,7 +672,7 @@ main(int argc, char *argv[]) { /* Create a spectral conversion object */ if ((sp2cie = new_xsp2cie(illum, illum == icxIT_none ? NULL : &cust_illum, - observ, NULL, icSigLabData, icxClamp)) == NULL) + obType, custObserver, icSigLabData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); if (fwacomp) { -- cgit v1.2.3