summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-08-14 20:38:59 +0100
committerRobin Watts <robin.watts@artifex.com>2015-08-17 12:36:22 +0100
commit67ad0213a15e3eccdc54ac43003743a65befca11 (patch)
treec0273a6762df4fe446819f65e45c202a295e789a /source
parent496d703c97c1fe7f99f28afca82696aeacbb5680 (diff)
downloadmupdf-67ad0213a15e3eccdc54ac43003743a65befca11.tar.xz
GProof: Fix creating images from a selection of separations
The code for this was broken; the wrong flag was being tested for selection number, and the values were being assembled per line rather than per pixel.
Diffstat (limited to 'source')
-rw-r--r--source/gprf/gprf-doc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index 5f5631aa..3899973f 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -353,15 +353,15 @@ gprf_get_pixmap(fz_context *ctx, fz_image *image_, int w, int h, int *l2factor)
}
else
{
- int c, m, y, k;
-
- c = m = y = k = 0;
for (n = 0; n < len; n++)
{
+ int c, m, y, k;
+
+ c = m = y = k = 0;
for (i = 3; i < num_seps; i++)
{
int v;
- if (read_sep[n] != 1)
+ if (read_sep[i] != 1)
continue;
v = data[i * decode_chunk_size + n];
c += v * equiv[i][0];
@@ -369,8 +369,8 @@ gprf_get_pixmap(fz_context *ctx, fz_image *image_, int w, int h, int *l2factor)
y += v * equiv[i][2];
k += v * equiv[i][3];
}
+ out = cmyk_to_rgba(out, c, m, y, k);
}
- out = cmyk_to_rgba(out, c, m, y, k);
}
}
}