diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-10-29 15:53:58 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-12-14 20:36:25 +0100 |
commit | d53ab7a97c018aaa0e0adcaabcebcc72c080f724 (patch) | |
tree | e0627cf3dcfb6c286bfadf9dedc40547875083e6 /source/tools | |
parent | 5ad76a1961559904bbb9312d92dd15c3ed0c67b5 (diff) | |
download | mupdf-d53ab7a97c018aaa0e0adcaabcebcc72c080f724.tar.xz |
Let pixmap colorspace conversion create new pixmap.
This moves dropping the converted pixmap into fz_convert_pixmap(),
which relieves every caller from doing so. Moreover resolution,
position and interpolation are kept.
Diffstat (limited to 'source/tools')
-rw-r--r-- | source/tools/pdfextract.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/tools/pdfextract.c b/source/tools/pdfextract.c index e8e03965..ff26229d 100644 --- a/source/tools/pdfextract.c +++ b/source/tools/pdfextract.c @@ -38,9 +38,7 @@ static void writepixmap(fz_context *ctx, fz_pixmap *pix, char *file, int dorgb) if (dorgb && pix->colorspace && pix->colorspace != fz_device_rgb(ctx)) { - fz_irect bbox; - rgb = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), fz_pixmap_bbox(ctx, pix, &bbox), pix->alpha); - fz_convert_pixmap(ctx, rgb, pix); + rgb = fz_convert_pixmap(ctx, pix, fz_device_rgb(ctx), 1); pix = rgb; } |