diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-06-29 17:49:50 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-05 15:32:35 +0200 |
commit | 4af205af9c210d144dd9d5f9ff3fb277f61f5e19 (patch) | |
tree | ff43f45eeab428372d5ad508c31995469e387750 /source/fitz | |
parent | f40106ac6b7367292432ee7af61608548d490e8c (diff) | |
download | mupdf-4af205af9c210d144dd9d5f9ff3fb277f61f5e19.tar.xz |
Silence warning.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/svg-device.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c index 17a35f7c..6e91aa11 100644 --- a/source/fitz/svg-device.c +++ b/source/fitz/svg-device.c @@ -855,14 +855,11 @@ svg_send_image(fz_context *ctx, svg_device *sdev, fz_image *img, const fz_color_ id = sdev->id++; out = start_def(ctx, sdev); fz_write_printf(ctx, out, "<symbol id=\"im%d\" viewBox=\"0 0 %d %d\">\n", id, img->w, img->h); - } - fz_write_printf(ctx, out, "<image width=\"%d\" height=\"%d\" xlink:href=\"data:", img->w, img->h); - fz_write_image_as_data_uri(ctx, out, img); - fz_write_printf(ctx, out, "\"/>\n"); + fz_write_printf(ctx, out, "<image width=\"%d\" height=\"%d\" xlink:href=\"data:", img->w, img->h); + fz_write_image_as_data_uri(ctx, out, img); + fz_write_printf(ctx, out, "\"/>\n"); - if (sdev->reuse_images) - { fz_write_printf(ctx, out, "</symbol>\n"); out = end_def(ctx, sdev); @@ -873,6 +870,12 @@ svg_send_image(fz_context *ctx, svg_device *sdev, fz_image *img, const fz_color_ fz_write_printf(ctx, out, "<use xlink:href=\"#im%d\" x=\"0\" y=\"0\" width=\"%d\" height=\"%d\"/>\n", id, img->w, img->h); } + else + { + fz_write_printf(ctx, out, "<image width=\"%d\" height=\"%d\" xlink:href=\"data:", img->w, img->h); + fz_write_image_as_data_uri(ctx, out, img); + fz_write_printf(ctx, out, "\"/>\n"); + } } static void |