~ubuntu-branches/ubuntu/trusty/argyll/trusty-proposed

« back to all changes in this revision

Viewing changes to xicc/xicclu.c

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2014-02-12 00:35:39 UTC
  • mfrom: (13.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20140212003539-24tautzlitsiz61w
Tags: 1.5.1-5ubuntu1
* Merge from Debian unstable. (LP: #1275572) Remaining changes:
  - debian/control:
    + Build-depend on libtiff-dev rather than libtiff4-dev.
  - debian/control, debian/patches/06_fix_udev_rule.patch:
    + Fix udev rules to actually work; ENV{ACL_MANAGE} has
      stopped working ages ago, and with logind it's now the
      "uaccess" tag. Dropping also consolekit from Recommends.
  - debian/patches/drop-usb-db.patch:
    + Use hwdb builtin, instead of the obsolete usb-db
      in the udev rules.
* debian/patches/05_ftbfs-underlinkage.diff:
  - Dropped change, no needed anymore.
* Refresh the patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        fprintf(stderr," -l tlimit      set total ink limit, 0 - 400%% (estimate by default)\n");
77
77
        fprintf(stderr," -L klimit      set black ink limit, 0 - 100%% (estimate by default)\n");
78
78
        fprintf(stderr," -a             show actual target values if clipped\n");
 
79
        fprintf(stderr," -u             warn if output PCS is outside the spectrum locus\n");
79
80
        fprintf(stderr," -m             merge output processing into clut\n");
80
81
        fprintf(stderr," -b             use CAM Jab for clipping\n");
81
82
//      fprintf(stderr," -S             Use internal optimised separation for inverse 4d [NOT IMPLEMENTED]\n");
163
164
        double vc_fxy[2] = {-1.0, -1.0};                /* Flare color override in x,y */
164
165
        int verb = 1;
165
166
        int actual = 0;
 
167
        int slocwarn = 0;
166
168
        int merge = 0;
167
169
        int camclip = 0;
168
170
        int repYxy = 0;                 /* Report Yxy */
257
259
                                        usage("Unrecognised parameters after -G");
258
260
                        }
259
261
                        /* Actual target values */
260
 
                        else if (argv[fa][1] == 'a' || argv[fa][1] == 'A') {
 
262
                        else if (argv[fa][1] == 'a') {
261
263
                                actual = 1;
262
264
                        }
 
265
                        /* Warn if output is outside the spectrum locus */
 
266
                        else if (argv[fa][1] == 'u') {
 
267
                                slocwarn = 1;
 
268
                        }
263
269
                        /* Merge output */
264
 
                        else if (argv[fa][1] == 'm' || argv[fa][1] == 'M') {
 
270
                        else if (argv[fa][1] == 'm') {
265
271
                                merge = 1;
266
272
                        }
267
273
                        /* Use CAM Jab for clipping on reverse lookup */
268
 
                        else if (argv[fa][1] == 'b' || argv[fa][1] == 'B') {
 
274
                        else if (argv[fa][1] == 'b') {
269
275
                                camclip = 1;
270
276
                        }
271
277
                        /* Use optimised internal separation */
273
279
                                intsep = 1;
274
280
                        }
275
281
                        /* Device scale */
276
 
                        else if (argv[fa][1] == 's' || argv[fa][1] == 'S') {
 
282
                        else if (argv[fa][1] == 's') {
277
283
                                fa = nfa;
278
284
                                if (na == NULL) usage("No parameter after flag -s");
279
285
                                scale = atof(na);
280
286
                                if (scale <= 0.0) usage("Illegal scale value");
281
287
                        }
282
288
                        /* function */
283
 
                        else if (argv[fa][1] == 'f' || argv[fa][1] == 'F') {
 
289
                        else if (argv[fa][1] == 'f') {
284
290
                                fa = nfa;
285
291
                                if (na == NULL) usage("No parameter after flag -f");
286
292
                        switch (na[0]) {
316
322
                        }
317
323
 
318
324
                        /* Intent */
319
 
                        else if (argv[fa][1] == 'i' || argv[fa][1] == 'I') {
 
325
                        else if (argv[fa][1] == 'i') {
320
326
                                fa = nfa;
321
327
                                if (na == NULL) usage("No parameter after flag -i");
322
328
                        switch (na[0]) {
346
352
                        }
347
353
 
348
354
                        /* PCS override */
349
 
                        else if (argv[fa][1] == 'p' || argv[fa][1] == 'P') {
 
355
                        else if (argv[fa][1] == 'p') {
350
356
                                fa = nfa;
351
357
                                if (na == NULL) usage("No parameter after flag -i");
352
358
                        switch (na[0]) {
401
407
                        }
402
408
 
403
409
                        /* Search order */
404
 
                        else if (argv[fa][1] == 'o' || argv[fa][1] == 'O') {
 
410
                        else if (argv[fa][1] == 'o') {
405
411
                                fa = nfa;
406
412
                                if (na == NULL) usage("No parameter after flag -o");
407
413
                        switch (na[0]) {
419
425
                        }
420
426
 
421
427
                        /* Inking rule */
422
 
                        else if (argv[fa][1] == 'k' || argv[fa][1] == 'K') {
 
428
                        else if (argv[fa][1] == 'k') {
423
429
                                fa = nfa;
424
430
                                if (na == NULL) usage("No parameter after flag -k");
425
431
                                if (argv[fa][1] == 'k')
528
534
                        }
529
535
#endif
530
536
                        /* Viewing conditions */
531
 
                        else if (argv[fa][1] == 'c' || argv[fa][1] == 'C') {
 
537
                        else if (argv[fa][1] == 'c') {
532
538
                                fa = nfa;
533
539
                                if (na == NULL) usage("No parameter after flag -c");
534
540
#ifdef NEVER
875
881
                if (pend[0] == -1000.0)
876
882
                        icmCpy3(pend, end);
877
883
 
 
884
                if (verb) {
 
885
                        printf("Plotting from white %f %f %f to black %f %f %f\n",
 
886
                                pstart[0], pstart[1], pstart[2], pend[0], pend[1], pend[2]);
 
887
                }
878
888
                for (i = 0; i < XRES; i++) {
879
889
                        double ival = (double)i/(XRES-1.0);
880
890
 
933
943
 
934
944
 
935
945
        } else {
 
946
 
 
947
                if (slocwarn && outs != icSigXYZData
 
948
                             && outs != icSigYxyData
 
949
                             && outs != icSigLabData
 
950
                             && outs != icxSigLChData) {
 
951
                        error("Can't warn if outside spectrum locus unless XYZ like space");
 
952
                }
 
953
 
936
954
                /* Process colors to translate */
937
955
                for (;;) {
938
956
                        int i,j;
939
957
                        char *bp, *nbp;
 
958
                        int outsloc = 0;
940
959
 
941
960
                        /* Read in the next line */
942
961
                        if (fgets(buf, 200, stdin) == NULL)
1002
1021
                                if ((rv = luo->lookup(luo, out, in)) > 1)
1003
1022
                                        error ("%d, %s",xicco->errc,xicco->err);
1004
1023
                        }
 
1024
 
 
1025
                        if (slocwarn) {
 
1026
                                double xyz[3];
 
1027
 
 
1028
                                if (outs == icSigLabData || outs == icxSigLChData)
 
1029
                                        icmLab2XYZ(&icmD50, out, xyz);  
 
1030
                                else
 
1031
                                        icmCpy3(xyz, out);
 
1032
 
 
1033
                                outsloc = icx_outside_spec_locus(xyz, icxOT_CIE_1931_2);
 
1034
                        }
 
1035
 
1005
1036
                        /* Copy conversion out value so that we can create user values */
1006
1037
                        for (i = 0; i < MAX_CHAN; i++)
1007
1038
                                uout[i] = out[i];
1071
1102
                                }
1072
1103
                                printf(" Lim %f",tot);
1073
1104
                        }
 
1105
                        if (outsloc)
 
1106
                                fprintf(stdout,"(Imaginary)");
 
1107
 
1074
1108
                        if (verb == 0 || rv == 0)
1075
1109
                                fprintf(stdout,"\n");
1076
1110
                        else {