summaryrefslogtreecommitdiff
path: root/icc/icclu.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 15:43:52 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 15:43:52 +0200
commitc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (patch)
tree41791cbe367cf023b98043fee56f9346b2592b49 /icc/icclu.c
parentd7f89e6fe63b8697fab5a901cfce457b375638b3 (diff)
Imported Upstream version 1.6.3upstream/1.6.3
Diffstat (limited to 'icc/icclu.c')
-rw-r--r--icc/icclu.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/icc/icclu.c b/icc/icclu.c
index ea32da0..80126da 100644
--- a/icc/icclu.c
+++ b/icc/icclu.c
@@ -245,6 +245,9 @@ main(int argc, char *argv[]) {
if ((rv = icco->read(icco,fp,0)) != 0)
error ("%d, %s",rv,icco->err);
+ if (icco->header->cmmId == str2tag("argl"))
+ icco->allowclutPoints256 = 1;
+
if (verb > 1) {
icmFile *op;
if ((op = new_icmFileStd_fp(stdout)) == NULL)
@@ -286,7 +289,7 @@ main(int argc, char *argv[]) {
continue;
}
/* For each input number */
- for (bp = buf-1, nbp = buf, i = 0; i < MAX_CHAN; i++) {
+ for (nbp = buf, i = 0; i < MAX_CHAN; i++) {
bp = nbp;
in[i] = oin[i] = strtod(bp, &nbp);
if (nbp == bp)
@@ -310,19 +313,7 @@ main(int argc, char *argv[]) {
}
if (repYxy && ins == icSigYxyData) {
- double Y = in[0];
- double x = in[1];
- double y = in[2];
- double z = 1.0 - x - y;
- double sum;
- if (y < 1e-6) {
- in[0] = in[1] = in[2] = 0.0;
- } else {
- sum = Y/y;
- in[0] = x * sum;
- in[1] = Y;
- in[2] = z * sum;
- }
+ icmYxy2XYZ(in, in);
}
/* Do conversion */
@@ -342,17 +333,7 @@ main(int argc, char *argv[]) {
}
if (repYxy && outs == icSigYxyData) {
- double X = out[0];
- double Y = out[1];
- double Z = out[2];
- double sum = X + Y + Z;
- if (sum < 1e-6) {
- out[0] = out[1] = out[2] = 0.0;
- } else {
- out[0] = Y;
- out[1] = X/sum;
- out[2] = Y/sum;
- }
+ icmXYZ2Yxy(out, out);
}
/* If device data and scale */