summaryrefslogtreecommitdiff
path: root/fitz/image_save.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-05-16 22:29:27 +0200
committerRobin Watts <robin.watts@artifex.com>2013-05-16 23:47:14 +0100
commit93bd1ff05bf315ed11b305d32eb510bd9a9a7e92 (patch)
tree10c2d846ed1193624a5119853bbc2ef9651e197c /fitz/image_save.c
parent558ad511446cfa1d70891d9e7c9fb1ba942d3d9a (diff)
downloadmupdf-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/image_save.c')
-rw-r--r--fitz/image_save.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/image_save.c b/fitz/image_save.c
index b0856507..8695002b 100644
--- a/fitz/image_save.c
+++ b/fitz/image_save.c
@@ -8,10 +8,10 @@ void fz_write_pixmap(fz_context *ctx, fz_pixmap *img, char *file, int rgb)
if (!img)
return;
- if (rgb && img->colorspace && img->colorspace != fz_device_rgb)
+ if (rgb && img->colorspace && img->colorspace != fz_device_rgb(ctx))
{
fz_irect bbox;
- converted = fz_new_pixmap_with_bbox(ctx, fz_device_rgb, fz_pixmap_bbox(ctx, img, &bbox));
+ converted = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), fz_pixmap_bbox(ctx, img, &bbox));
fz_convert_pixmap(ctx, converted, img);
img = converted;
}