summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-10-29 15:04:28 +0100
committerTor Andersson <tor.andersson@artifex.com>2013-10-31 11:35:11 +0100
commitdb7847f2c8a4d15d858941b86ef90c1714b78717 (patch)
treef81922fb114ed7d6db2f61bc3375e5e65b803ee6 /source
parentf9750892b61d4dce53b4ee082fce90a8394ac8e0 (diff)
downloadmupdf-db7847f2c8a4d15d858941b86ef90c1714b78717.tar.xz
Fix bug in gray to cmyk color converters.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/colorspace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c
index 5cefe979..33fa07fb 100644
--- a/source/fitz/colorspace.c
+++ b/source/fitz/colorspace.c
@@ -319,7 +319,7 @@ static void fast_gray_to_cmyk(fz_pixmap *dst, fz_pixmap *src)
d[0] = 0;
d[1] = 0;
d[2] = 0;
- d[3] = s[0];
+ d[3] = 255 - s[0];
d[4] = s[1];
s += 2;
d += 5;
@@ -1027,7 +1027,7 @@ g2cmyk(fz_color_converter *cc, float *dv, float *sv)
dv[0] = 0;
dv[1] = 0;
dv[2] = 0;
- dv[3] = sv[0];
+ dv[3] = 1 - sv[0];
}
static void
@@ -1172,7 +1172,6 @@ void
fz_convert_color(fz_context *ctx, fz_colorspace *ds, float *dv, fz_colorspace *ss, float *sv)
{
fz_color_converter cc;
-
fz_lookup_color_converter(&cc, ctx, ds, ss);
cc.convert(&cc, dv, sv);
}