diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-05-16 22:29:27 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-16 23:47:14 +0100 |
commit | 93bd1ff05bf315ed11b305d32eb510bd9a9a7e92 (patch) | |
tree | 10c2d846ed1193624a5119853bbc2ef9651e197c /fitz/res_pixmap.c | |
parent | 558ad511446cfa1d70891d9e7c9fb1ba942d3d9a (diff) | |
download | mupdf-93bd1ff05bf315ed11b305d32eb510bd9a9a7e92.tar.xz |
Add colorspace context.
To prepare for color management, we have to make the device colorspaces
per-context and able to be overridden by users.
Diffstat (limited to 'fitz/res_pixmap.c')
-rw-r--r-- | fitz/res_pixmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c index 6a931486..18d05231 100644 --- a/fitz/res_pixmap.c +++ b/fitz/res_pixmap.c @@ -694,9 +694,9 @@ fz_image_as_png(fz_context *ctx, fz_image *image, int w, int h) fz_try(ctx) { - if (pix->colorspace != fz_device_gray || pix->colorspace != fz_device_rgb) + if (pix->colorspace != fz_device_gray(ctx) || pix->colorspace != fz_device_rgb(ctx)) { - fz_pixmap *pix2 = fz_new_pixmap(ctx, fz_device_rgb, pix->w, pix->h); + fz_pixmap *pix2 = fz_new_pixmap(ctx, fz_device_rgb(ctx), pix->w, pix->h); fz_convert_pixmap(ctx, pix2, pix); fz_drop_pixmap(ctx, pix); pix = pix2; |