diff options
Diffstat (limited to 'fitz/image_save.c')
-rw-r--r-- | fitz/image_save.c | 4 |
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; } |