diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-12-15 11:31:36 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-15 14:11:10 +0100 |
commit | 3afdcd7307fd5e68f35c7bb91a4d856499f1df44 (patch) | |
tree | 13253bb6d7af2716f882e878be956fa157544ec6 /source/tools | |
parent | 88a1d527a50e3cc48606ce097a335669ae84a716 (diff) | |
download | mupdf-3afdcd7307fd5e68f35c7bb91a4d856499f1df44.tar.xz |
Rename fz_write_x to fz_save_pixmap_as_x or fz_save_bitmap_as_x.
Separate naming of functions that save complete files to disk
from functions that write data to streams.
Diffstat (limited to 'source/tools')
-rw-r--r-- | source/tools/mudraw.c | 18 | ||||
-rw-r--r-- | source/tools/pdfclean.c | 2 | ||||
-rw-r--r-- | source/tools/pdfextract.c | 4 | ||||
-rw-r--r-- | source/tools/pdfposter.c | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index b486171a..f80c2c0e 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -615,11 +615,11 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) if (out_cs == CS_MONO) { fz_bitmap *bit = fz_halftone_pixmap(ctx, pix, NULL); - fz_write_pwg_bitmap(ctx, bit, filename_buf, append, NULL); + fz_save_bitmap_as_pwg(ctx, bit, filename_buf, append, NULL); fz_drop_bitmap(ctx, bit); } else - fz_write_pwg(ctx, pix, filename_buf, append, NULL); + fz_save_pixmap_as_pwg(ctx, pix, filename_buf, append, NULL); append = 1; } else if (output_format == OUT_PCL) @@ -633,21 +633,21 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) if (out_cs == CS_MONO) { fz_bitmap *bit = fz_halftone_pixmap(ctx, pix, NULL); - fz_write_pcl_bitmap(ctx, bit, filename_buf, append, &options); + fz_save_bitmap_as_pcl(ctx, bit, filename_buf, append, &options); fz_drop_bitmap(ctx, bit); } else - fz_write_pcl(ctx, pix, filename_buf, append, &options); + fz_save_pixmap_as_pcl(ctx, pix, filename_buf, append, &options); append = 1; } else if (output_format == OUT_PBM) { fz_bitmap *bit = fz_halftone_pixmap(ctx, pix, NULL); - fz_write_pbm(ctx, bit, filename_buf); + fz_save_bitmap_as_pbm(ctx, bit, filename_buf); fz_drop_bitmap(ctx, bit); } else if (output_format == OUT_TGA) { - fz_write_tga(ctx, pix, filename_buf, savealpha); + fz_save_pixmap_as_tga(ctx, pix, filename_buf, savealpha); } } ctm.f -= drawheight; @@ -1094,7 +1094,7 @@ int mudraw_main(int argc, char **argv) fz_printf(ctx, out, "<document name=\"%s\">\n", filename); if (output_format == OUT_GPROOF) { - fz_write_gproof_file(ctx, filename, doc, output, resolution, "", ""); + fz_save_gproof(ctx, filename, doc, output, resolution, "", ""); } else { @@ -1130,9 +1130,9 @@ int mudraw_main(int argc, char **argv) if (pdfout) { - fz_write_options opts = { 0 }; + fz_save_options opts = { 0 }; - pdf_write_document(ctx, pdfout, output, &opts); + pdf_save_document(ctx, pdfout, output, &opts); pdf_close_document(ctx, pdfout); } diff --git a/source/tools/pdfclean.c b/source/tools/pdfclean.c index 7a7f68bc..93ec762d 100644 --- a/source/tools/pdfclean.c +++ b/source/tools/pdfclean.c @@ -37,7 +37,7 @@ int pdfclean_main(int argc, char **argv) char *outfile = "out.pdf"; char *password = ""; int c; - fz_write_options opts; + fz_save_options opts; int errors = 0; fz_context *ctx; diff --git a/source/tools/pdfextract.c b/source/tools/pdfextract.c index 0c89931a..6f2ed1ca 100644 --- a/source/tools/pdfextract.c +++ b/source/tools/pdfextract.c @@ -48,13 +48,13 @@ static void writepixmap(fz_context *ctx, fz_pixmap *pix, char *file, int rgb) { snprintf(buf, sizeof(buf), "%s.png", file); printf("extracting image %s\n", buf); - fz_write_png(ctx, pix, buf, 0); + fz_save_pixmap_as_png(ctx, pix, buf, 0); } else { snprintf(buf, sizeof(buf), "%s.pam", file); printf("extracting image %s\n", buf); - fz_write_pam(ctx, pix, buf, 0); + fz_save_pixmap_as_pam(ctx, pix, buf, 0); } fz_drop_pixmap(ctx, converted); diff --git a/source/tools/pdfposter.c b/source/tools/pdfposter.c index 9a58909e..16bbc080 100644 --- a/source/tools/pdfposter.c +++ b/source/tools/pdfposter.c @@ -157,7 +157,7 @@ int pdfposter_main(int argc, char **argv) char *outfile = "out.pdf"; char *password = ""; int c; - fz_write_options opts = { 0 }; + fz_save_options opts = { 0 }; pdf_document *doc; fz_context *ctx; @@ -203,7 +203,7 @@ int pdfposter_main(int argc, char **argv) decimatepages(ctx, doc); - pdf_write_document(ctx, doc, outfile, &opts); + pdf_save_document(ctx, doc, outfile, &opts); pdf_close_document(ctx, doc); fz_drop_context(ctx); |