summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-12-15 11:31:36 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-12-15 14:11:10 +0100
commit3afdcd7307fd5e68f35c7bb91a4d856499f1df44 (patch)
tree13253bb6d7af2716f882e878be956fa157544ec6 /source/fitz
parent88a1d527a50e3cc48606ce097a335669ae84a716 (diff)
downloadmupdf-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/fitz')
-rw-r--r--source/fitz/bitmap.c2
-rw-r--r--source/fitz/document.c6
-rw-r--r--source/fitz/draw-device.c2
-rw-r--r--source/fitz/output-pcl.c4
-rw-r--r--source/fitz/output-pwg.c4
-rw-r--r--source/fitz/pixmap.c8
6 files changed, 13 insertions, 13 deletions
diff --git a/source/fitz/bitmap.c b/source/fitz/bitmap.c
index 5d2af061..a9a53a98 100644
--- a/source/fitz/bitmap.c
+++ b/source/fitz/bitmap.c
@@ -67,7 +67,7 @@ fz_output_pbm(fz_context *ctx, fz_output *out, fz_bitmap *bitmap)
}
void
-fz_write_pbm(fz_context *ctx, fz_bitmap *bitmap, char *filename)
+fz_save_bitmap_as_pbm(fz_context *ctx, fz_bitmap *bitmap, char *filename)
{
fz_output *out = fz_new_output_with_path(ctx, filename, 0);
fz_try(ctx)
diff --git a/source/fitz/document.c b/source/fitz/document.c
index 1fc4ff87..588ee71c 100644
--- a/source/fitz/document.c
+++ b/source/fitz/document.c
@@ -240,10 +240,10 @@ fz_lookup_metadata(fz_context *ctx, fz_document *doc, const char *key, char *buf
}
void
-fz_write_document(fz_context *ctx, fz_document *doc, char *filename, fz_write_options *opts)
+fz_save_document(fz_context *ctx, fz_document *doc, char *filename, fz_save_options *opts)
{
- if (doc && doc->write)
- doc->write(ctx, doc, filename, opts);
+ if (doc && doc->save)
+ doc->save(ctx, doc, filename, opts);
}
fz_page *
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index 065daaa9..08ab129a 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -63,7 +63,7 @@ static void fz_dump_blend(fz_context *ctx, fz_pixmap *pix, const char *s)
printf("%s%02d", s, group_dump_count);
group_dump_count++;
- fz_write_png(ctx, pix, name, (pix->n > 1));
+ fz_save_pixmap_as_png(ctx, pix, name, (pix->n > 1));
}
static void dump_spaces(int x, const char *s)
diff --git a/source/fitz/output-pcl.c b/source/fitz/output-pcl.c
index 9d21a6d3..a87a84a9 100644
--- a/source/fitz/output-pcl.c
+++ b/source/fitz/output-pcl.c
@@ -790,7 +790,7 @@ fz_output_pcl_bitmap(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, f
}
void
-fz_write_pcl(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, fz_pcl_options *pcl)
+fz_save_pixmap_as_pcl(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, fz_pcl_options *pcl)
{
fz_output *out = fz_new_output_with_path(ctx, filename, append);
fz_try(ctx)
@@ -802,7 +802,7 @@ fz_write_pcl(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, fz_
}
void
-fz_write_pcl_bitmap(fz_context *ctx, fz_bitmap *bitmap, char *filename, int append, fz_pcl_options *pcl)
+fz_save_bitmap_as_pcl(fz_context *ctx, fz_bitmap *bitmap, char *filename, int append, fz_pcl_options *pcl)
{
fz_output *out = fz_new_output_with_path(ctx, filename, append);
fz_try(ctx)
diff --git a/source/fitz/output-pwg.c b/source/fitz/output-pwg.c
index d46dd04f..4810049a 100644
--- a/source/fitz/output-pwg.c
+++ b/source/fitz/output-pwg.c
@@ -258,7 +258,7 @@ fz_output_pwg(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz
}
void
-fz_write_pwg(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, const fz_pwg_options *pwg)
+fz_save_pixmap_as_pwg(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, const fz_pwg_options *pwg)
{
fz_output *out = fz_new_output_with_path(ctx, filename, append);
fz_try(ctx)
@@ -274,7 +274,7 @@ fz_write_pwg(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, con
}
void
-fz_write_pwg_bitmap(fz_context *ctx, fz_bitmap *bitmap, char *filename, int append, const fz_pwg_options *pwg)
+fz_save_bitmap_as_pwg(fz_context *ctx, fz_bitmap *bitmap, char *filename, int append, const fz_pwg_options *pwg)
{
fz_output *out = fz_new_output_with_path(ctx, filename, append);
fz_try(ctx)
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 9f1ec20e..255418bb 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -583,7 +583,7 @@ fz_output_pnm(fz_context *ctx, fz_output *out, fz_pixmap *pixmap)
}
void
-fz_write_pnm(fz_context *ctx, fz_pixmap *pixmap, char *filename)
+fz_save_pixmap_as_pnm(fz_context *ctx, fz_pixmap *pixmap, char *filename)
{
fz_output *out = fz_new_output_with_path(ctx, filename, 0);
fz_output_pnm_header(ctx, out, pixmap->w, pixmap->h, pixmap->n);
@@ -652,7 +652,7 @@ fz_output_pam(fz_context *ctx, fz_output *out, fz_pixmap *pixmap, int savealpha)
}
void
-fz_write_pam(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha)
+fz_save_pixmap_as_pam(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha)
{
fz_output *out = fz_new_output_with_path(ctx, filename, 0);
fz_output_pam_header(ctx, out, pixmap->w, pixmap->h, pixmap->n, savealpha);
@@ -687,7 +687,7 @@ static void putchunk(fz_context *ctx, fz_output *out, char *tag, unsigned char *
}
void
-fz_write_png(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha)
+fz_save_pixmap_as_png(fz_context *ctx, fz_pixmap *pixmap, const char *filename, int savealpha)
{
fz_output *out = fz_new_output_with_path(ctx, filename, 0);
fz_png_output_context *poc = NULL;
@@ -978,7 +978,7 @@ static inline void tga_put_pixel(fz_context *ctx, fz_output *out, unsigned char
}
void
-fz_write_tga(fz_context *ctx, fz_pixmap *pixmap, const char *filename, int savealpha)
+fz_save_pixmap_as_tga(fz_context *ctx, fz_pixmap *pixmap, const char *filename, int savealpha)
{
fz_output *out;
unsigned char head[18];