summaryrefslogtreecommitdiff
path: root/fitz/text_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/text_output.c')
-rw-r--r--fitz/text_output.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fitz/text_output.c b/fitz/text_output.c
index 7aceddef..6942eb67 100644
--- a/fitz/text_output.c
+++ b/fitz/text_output.c
@@ -258,15 +258,10 @@ fz_print_text_page_html(fz_context *ctx, fz_output *out, fz_text_page *page)
break;
default:
{
- fz_pixmap *pix = fz_image_get_pixmap(ctx, image->image, image->image->w, image->image->h);
- fz_buffer *buf = fz_new_buffer(ctx, 1024);
- fz_output *out2 = fz_new_output_with_buffer(ctx, buf);
- fz_output_pixmap_to_png(ctx, pix, out2, 0);
- fz_close_output(out2);
+ fz_buffer *buf = fz_image_as_png(ctx, image->image, image->image->w, image->image->h);
fz_printf(out, "image/png;base64,");
send_data_base64(out, buf);
fz_drop_buffer(ctx, buf);
- fz_drop_pixmap(ctx, pix);
break;
}
}