diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-04-14 13:51:32 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-04-28 12:30:43 +0100 |
commit | 44fff08dc64d358df441a9e615bbaacf7b01d54a (patch) | |
tree | bab4f36472952ccdfff594fd699230f2f15b1b23 /source/fitz/stext-output.c | |
parent | 88e9fd50724cff8d656060715fa56409ba7dab84 (diff) | |
download | mupdf-44fff08dc64d358df441a9e615bbaacf7b01d54a.tar.xz |
Refactor fz_image code cases.
Split compressed images (images based on a compressed buffer)
and pixmap images (images based on a pixmap) out into separate
subclasses.
Diffstat (limited to 'source/fitz/stext-output.c')
-rw-r--r-- | source/fitz/stext-output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/fitz/stext-output.c b/source/fitz/stext-output.c index 70b0bf7e..c19c5b4b 100644 --- a/source/fitz/stext-output.c +++ b/source/fitz/stext-output.c @@ -245,16 +245,17 @@ fz_print_stext_page_html(fz_context *ctx, fz_output *out, fz_stext_page *page) case FZ_PAGE_BLOCK_IMAGE: { fz_image_block *image = page->blocks[block_n].u.image; + fz_compressed_buffer *buffer = fz_compressed_image_buffer(ctx, image->image); fz_printf(ctx, out, "<img width=%d height=%d src=\"data:", image->image->w, image->image->h); - switch (image->image->buffer == NULL ? FZ_IMAGE_JPX : image->image->buffer->params.type) + switch (buffer == NULL ? FZ_IMAGE_JPX : buffer->params.type) { case FZ_IMAGE_JPEG: fz_printf(ctx, out, "image/jpeg;base64,"); - send_data_base64(ctx, out, image->image->buffer->buffer); + send_data_base64(ctx, out, buffer->buffer); break; case FZ_IMAGE_PNG: fz_printf(ctx, out, "image/png;base64,"); - send_data_base64(ctx, out, image->image->buffer->buffer); + send_data_base64(ctx, out, buffer->buffer); break; default: { |