summaryrefslogtreecommitdiff
path: root/source/fitz/stext-output.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-07 11:08:42 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-28 12:30:40 +0100
commitb944f16a564f8a31d9a064980318ad690be31f8e (patch)
tree6fb5a572487943e7cdccee2b201ae526c23bd595 /source/fitz/stext-output.c
parent6ab232064f3fc9037e97157dd9a77f286ad85e23 (diff)
downloadmupdf-b944f16a564f8a31d9a064980318ad690be31f8e.tar.xz
Partial image decode.
Update the core fz_get_pixmap_from_image code to allow fetching a subarea of a pixmap. We pass in the required subarea, together with the transformation matrix for the whole image. On return, we have a pixmap at least as big as was requested, and the transformation matrix is updated to map the supplied area to the correct place on the screen. The draw device is updated to use this as required. Everywhere else passes NULLs in, and so gets unchanged behaviour. The standard 'get_pixmap' function has been updated to decode just the required areas of the bitmaps. This means that banded rendering of pages will decode just the image subareas that are required for each band, limiting the memory use. The downside to this is that each band will redecode the image again to extract just the section we want. The image subareas are put into the fz_store in the same way as full images. Currently image areas in the store are only matched when they match exactly; subareas are not identified as being able to use existing images.
Diffstat (limited to 'source/fitz/stext-output.c')
-rw-r--r--source/fitz/stext-output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/stext-output.c b/source/fitz/stext-output.c
index 1ba9fe51..70b0bf7e 100644
--- a/source/fitz/stext-output.c
+++ b/source/fitz/stext-output.c
@@ -258,7 +258,7 @@ fz_print_stext_page_html(fz_context *ctx, fz_output *out, fz_stext_page *page)
break;
default:
{
- fz_buffer *buf = fz_new_buffer_from_image_as_png(ctx, image->image, image->image->w, image->image->h);
+ fz_buffer *buf = fz_new_buffer_from_image_as_png(ctx, image->image);
fz_printf(ctx, out, "image/png;base64,");
send_data_base64(ctx, out, buf);
fz_drop_buffer(ctx, buf);