diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
commit | f783c31203be2dbd7a28c89557014f97a367bec9 (patch) | |
tree | 8faea8d21fa44b99226af34a13f33c6a0e1f7182 /pdf/pdf_colorspace.c | |
parent | aa7668835afffd5a2a496a60ed6edb672f5af1a7 (diff) | |
download | mupdf-f783c31203be2dbd7a28c89557014f97a367bec9.tar.xz |
Add warning context.
Diffstat (limited to 'pdf/pdf_colorspace.c')
-rw-r--r-- | pdf/pdf_colorspace.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pdf/pdf_colorspace.c b/pdf/pdf_colorspace.c index 1a2e79b3..4c4368cc 100644 --- a/pdf/pdf_colorspace.c +++ b/pdf/pdf_colorspace.c @@ -30,7 +30,7 @@ static inline float fung(float x) } static void -lab_to_rgb(fz_colorspace *cs, float *lab, float *rgb) +lab_to_rgb(fz_context *ctx, fz_colorspace *cs, float *lab, float *rgb) { /* input is in range (0..100, -128..127, -128..127) not (0..1, 0..1, 0..1) */ float lstar, astar, bstar, l, m, n, x, y, z, r, g, b; @@ -52,9 +52,9 @@ lab_to_rgb(fz_colorspace *cs, float *lab, float *rgb) } static void -rgb_to_lab(fz_colorspace *cs, float *rgb, float *lab) +rgb_to_lab(fz_context *ctx, fz_colorspace *cs, float *rgb, float *lab) { - fz_warn("cannot convert into L*a*b colorspace"); + fz_warn(ctx, "cannot convert into L*a*b colorspace"); lab[0] = rgb[0]; lab[1] = rgb[1]; lab[2] = rgb[2]; @@ -72,12 +72,12 @@ struct separation }; static void -separation_to_rgb(fz_colorspace *cs, float *color, float *rgb) +separation_to_rgb(fz_context *ctx, fz_colorspace *cs, float *color, float *rgb) { struct separation *sep = cs->data; float alt[FZ_MAX_COLORS]; - pdf_eval_function(sep->tint, color, cs->n, alt, sep->base->n); - sep->base->to_rgb(sep->base, alt, rgb); + pdf_eval_function(ctx, sep->tint, color, cs->n, alt, sep->base->n); + sep->base->to_rgb(ctx, sep->base, alt, rgb); } static void @@ -145,7 +145,7 @@ struct indexed }; static void -indexed_to_rgb(fz_colorspace *cs, float *color, float *rgb) +indexed_to_rgb(fz_context *ctx, fz_colorspace *cs, float *color, float *rgb) { struct indexed *idx = cs->data; float alt[FZ_MAX_COLORS]; @@ -154,7 +154,7 @@ indexed_to_rgb(fz_colorspace *cs, float *color, float *rgb) i = CLAMP(i, 0, idx->high); for (k = 0; k < idx->base->n; k++) alt[k] = idx->lookup[i * idx->base->n + k] / 255.0f; - idx->base->to_rgb(idx->base, alt, rgb); + idx->base->to_rgb(ctx, idx->base, alt, rgb); } static void |