87
87
fprintf(stderr," -M model Model description string\n");
88
88
fprintf(stderr," -D description Profile Description string (Default \"inoutfile\")\n");
89
89
fprintf(stderr," -C copyright Copyright string\n");
90
fprintf(stderr," -Z [tmnb] Attributes: Transparency, Matte, Negative, BlackAndWhite\n");
91
fprintf(stderr," -Z [prsa] Default intent: Perceptual, Rel. Colorimetric, Saturation, Abs. Colorimetric\n");
90
fprintf(stderr," -Z tmnb Attributes: Transparency, Matte, Negative, BlackAndWhite\n");
91
fprintf(stderr," -Z prsa Default intent: Perceptual, Rel. Colorimetric, Saturation, Abs. Colorimetric\n");
93
93
fprintf(stderr," -q lmhu Quality - Low, Medium (def), High, Ultra\n");
94
94
// fprintf(stderr," -q fmsu Speed - Fast, Medium (def), Slow, Ultra Slow\n");
117
117
// Development - not supported
118
118
// fprintf(stderr," -I ver Set ICC profile version > 2.2.0\n");
119
119
// fprintf(stderr," ver = 4, Enable ICC V4 creation\n");
120
fprintf(stderr," -u If input profile, make it absolute (non-standard)\n");
121
fprintf(stderr," -un Same as u, but don't extrapolate cLut white & black using matrix\n");
120
fprintf(stderr," -u If input profile, auto scale WP to allow extrapolation\n");
121
fprintf(stderr," -uc If input profile, clip cLUT values above WP\n");
122
122
fprintf(stderr," -U scale If input profile, scale media white point by scale\n");
123
123
fprintf(stderr," -R Restrict white <= 1.0, black and primaries to be +ve\n");
124
fprintf(stderr," -i illum Choose illuminant for print/transparency spectral data:\n");
125
fprintf(stderr," A, C, D50 (def.), D65, F5, F8, F10 or file.sp\n");
124
fprintf(stderr," -f [illum] Use Fluorescent Whitening Agent compensation [opt. simulated inst. illum.:\n");
125
fprintf(stderr," M0, M1, M2, A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp]\n");
126
fprintf(stderr," -i illum Choose illuminant for computation of CIE XYZ from spectral data & FWA:\n");
127
fprintf(stderr," A, C, D50 (def.), D50M2, D65, F5, F8, F10 or file.sp\n");
126
128
fprintf(stderr," -o observ Choose CIE Observer for spectral data:\n");
127
fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n");
128
fprintf(stderr," -f Use Fluorescent Whitening Agent compensation\n");
129
fprintf(stderr," 1931_2 (def), 1964_10, S&B 1955_2, shaw, J&V 1978_2\n");
129
130
fprintf(stderr," -r avgdev Average deviation of device+instrument readings as a percentage (default %4.2f%%)\n",DEFAVGDEV);
130
131
/* Research options: */
131
/* fprintf(stderr," -r sSMOOTH RSPL suplimental optimised smoothing factor\n"); */
132
/* fprintf(stderr," -r rSMOOTH RSPL raw underlying smoothing factor\n"); */
132
/* fprintf(stderr," -r sSMOOTH RSPL or shaper suplimental optimised smoothing factor\n"); */
133
/* fprintf(stderr," -r rSMOOTH RSPL or shaper raw underlying smoothing factor\n"); */
133
134
fprintf(stderr," -s src%s Apply gamut mapping to output profile perceptual B2A table for given source space\n",ICC_FILE_EXT);
134
135
fprintf(stderr," -S src%s Apply gamut mapping to output profile perceptual and saturation B2A table\n",ICC_FILE_EXT);
135
136
fprintf(stderr," -nP Use colormetric source gamut to make output profile perceptual table\n");
179
180
int noptop = 0; /* Use colormetric source gamut to make perceptual table */
180
181
int nostos = 0; /* Use colormetric source gamut to make saturation table */
181
182
int gamdiag = 0; /* Make gamut mapping diagnostic wrl plots */
182
int nsabs = 0; /* Make non-standard absolute input lut profile */
183
int autowpsc = 0; /* Auto scale the WP to prevent clipping above WP patch */
184
int clipovwp = 0; /* Clip cLUT values above WP */
183
185
int clipprims = 0; /* Clip white, black and primaries */
184
186
double iwpscale = -1.0; /* Input white point scale factor */
185
int doinextrap = 1; /* Sythesize extra input sample points for cLUT */
187
int doinextrap = 1; /* Sythesize extra sample points for input device cLUT */
186
188
int doinb2a = 1; /* Create an input device B2A table */
187
189
int inking = 3; /* Default K target ramp K */
188
190
int locus = 0; /* Default K value target */
193
195
double avgdev = DEFAVGDEV/100.0; /* Average measurement deviation */
194
196
double smooth = 1.0; /* RSPL Smoothness factor (relative, for verification) */
195
197
int spec = 0; /* Use spectral data flag */
198
icxIllumeType tillum = icxIT_none; /* Target/simulated instrument illuminant */
199
xspect cust_tillum; /* Custom target/simulated illumination spectrum */
196
200
icxIllumeType illum = icxIT_D50; /* Spectral defaults */
197
201
xspect cust_illum; /* Custom illumination spectrum */
198
202
icxObserverType observ = icxOT_CIE_1931_2; /* The classic observer */
579
589
usage("Unknown argument '%c' to version flag -I",na[0] );
593
/* FWA compensation */
594
else if (argv[fa][1] == 'f') {
597
if (na != NULL) { /* Argument is present - target/simulated instr. illum. */
599
if (strcmp(na, "A") == 0
600
|| strcmp(na, "M0") == 0) {
603
} else if (strcmp(na, "C") == 0) {
606
} else if (strcmp(na, "D50") == 0
607
|| strcmp(na, "M1") == 0) {
610
} else if (strcmp(na, "D50M2") == 0
611
|| strcmp(na, "M2") == 0) {
613
tillum = icxIT_D50M2;
614
} else if (strcmp(na, "D65") == 0) {
617
} else if (strcmp(na, "F5") == 0) {
620
} else if (strcmp(na, "F8") == 0) {
623
} else if (strcmp(na, "F10") == 0) {
626
} else { /* Assume it's a filename */
628
tillum = icxIT_custom;
629
if (read_xspect(&cust_tillum, na) != 0)
630
usage("Failed to read custom target illuminant spectrum in file '%s'",na);
582
635
/* Spectral Illuminant type */
583
636
else if (argv[fa][1] == 'i') {
981
1038
error ("Output profile can only be a cLUT algorithm");
985
error ("Input absolute mode isn't applicable to an output device");
1042
error ("Input auto WP scale mode isn't applicable to an output device");
1044
error ("Input cLUT clipping above WP mode isn't applicable to an output device");
987
1046
make_output_icc(ptype, 0, iccver, verb, iquality, oquality,
988
1047
noisluts, noipluts, nooluts, nocied, noptop, nostos,
989
gamdiag, verify, clipprims, &ink, inname, outname, icg, spec,
990
illum, &cust_illum, observ, fwacomp, smooth, avgdev,
1048
gamdiag, verify, clipprims, &ink, inname, outname, icg,
1049
spec, tillum, &cust_tillum, illum, &cust_illum, observ, fwacomp,
991
1051
ipname[0] != '\000' ? ipname : NULL,
992
1052
sgname[0] != '\000' ? sgname : NULL,
999
1059
if (ptype == prof_default)
1000
1060
ptype = prof_clutLab; /* For best possible quality */
1062
if (clipovwp && ptype != prof_clutLab && ptype != prof_clutXYZ)
1063
error ("Input cLUT clipping above WP mode isn't applicable to a matrix profile");
1002
1065
make_input_icc(ptype, iccver, verb, iquality, oquality, noisluts, noipluts, nooluts, nocied,
1003
verify, nsabs, iwpscale, doinb2a, doinextrap, clipprims, inname, outname,
1004
icg, spec, illum, &cust_illum, observ, smooth, avgdev, &xpi);
1066
verify, autowpsc, clipovwp, iwpscale, doinb2a, doinextrap, clipprims,
1067
inname, outname, icg, spec, illum, &cust_illum, observ,
1068
smooth, avgdev, &xpi);
1006
1070
} else if (strcmp(icg->t[0].kdata[ti],"DISPLAY") == 0) {
1009
error ("Input absolute mode isn't applicable to a display device");
1073
error ("Input auto WP scale mode isn't applicable to an output device");
1075
error ("Input cLUT clipping above WP mode isn't applicable to an output device");
1012
1078
error ("FWA compensation isn't applicable to a display device");
1017
1083
/* If a source gamut is provided for a Display, then a V2.4.0 profile will be created */
1018
1084
make_output_icc(ptype, mtxtoo, iccver, verb, iquality, oquality,
1019
1085
noisluts, noipluts, nooluts, nocied, noptop, nostos,
1020
gamdiag, verify, clipprims, NULL, inname, outname, icg, spec,
1021
illum, &cust_illum, observ, 0, smooth, avgdev,
1086
gamdiag, verify, clipprims, NULL, inname, outname, icg,
1087
spec, icxIT_none, NULL, illum, &cust_illum, observ, 0,
1022
1089
ipname[0] != '\000' ? ipname : NULL,
1023
1090
sgname[0] != '\000' ? sgname : NULL,