diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-12-15 12:08:37 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-15 14:11:10 +0100 |
commit | 209046c6faf046e7198cd159c232cfb885c58740 (patch) | |
tree | fad1a6499b08131595afefa0420008f69aa353ac /include | |
parent | 3afdcd7307fd5e68f35c7bb91a4d856499f1df44 (diff) | |
download | mupdf-209046c6faf046e7198cd159c232cfb885c58740.tar.xz |
Rename fz_output_x to fz_write_pixmap_as_x etc.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/output-pcl.h | 4 | ||||
-rw-r--r-- | include/mupdf/fitz/output-png.h | 27 | ||||
-rw-r--r-- | include/mupdf/fitz/output-pnm.h | 14 | ||||
-rw-r--r-- | include/mupdf/fitz/output-pwg.h | 13 |
4 files changed, 30 insertions, 28 deletions
diff --git a/include/mupdf/fitz/output-pcl.h b/include/mupdf/fitz/output-pcl.h index 83f6cd79..3817fd91 100644 --- a/include/mupdf/fitz/output-pcl.h +++ b/include/mupdf/fitz/output-pcl.h @@ -89,9 +89,9 @@ void fz_pcl_preset(fz_context *ctx, fz_pcl_options *opts, const char *preset); */ void fz_pcl_option(fz_context *ctx, fz_pcl_options *opts, const char *option, int val); -void fz_output_pcl(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, fz_pcl_options *pcl); +void fz_write_pixmap_as_pcl(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, fz_pcl_options *pcl); -void fz_output_pcl_bitmap(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, fz_pcl_options *pcl); +void fz_write_bitmap_as_pcl(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, fz_pcl_options *pcl); void fz_save_pixmap_as_pcl(fz_context *ctx, fz_pixmap *pixmap, char *filename, int append, fz_pcl_options *pcl); diff --git a/include/mupdf/fitz/output-png.h b/include/mupdf/fitz/output-png.h index 3ae6d3d0..dd1ef465 100644 --- a/include/mupdf/fitz/output-png.h +++ b/include/mupdf/fitz/output-png.h @@ -11,28 +11,25 @@ #include "mupdf/fitz/image.h" /* - fz_save_pixmap_as_png: Save a pixmap as a png - - filename: The filename to save as (including extension). + fz_save_pixmap_as_png: Save a pixmap as a PNG image file. */ void fz_save_pixmap_as_png(fz_context *ctx, fz_pixmap *pixmap, const char *filename, int savealpha); /* - Output a pixmap to an output stream as a png. -*/ -void fz_output_png(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, int savealpha); - -/* - Get an image as a png in a buffer. + Write a pixmap to an output stream in PNG format. */ -fz_buffer *fz_new_png_from_image(fz_context *ctx, fz_image *image, int w, int h); - -fz_buffer *fz_new_png_from_pixmap(fz_context *ctx, fz_pixmap *pixmap); +void fz_write_pixmap_as_png(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, int savealpha); typedef struct fz_png_output_context_s fz_png_output_context; -fz_png_output_context *fz_output_png_header(fz_context *ctx, fz_output *out, int w, int h, int n, int savealpha); -void fz_output_png_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *samples, int savealpha, fz_png_output_context *poc); -void fz_output_png_trailer(fz_context *ctx, fz_output *out, fz_png_output_context *poc); +fz_png_output_context *fz_write_png_header(fz_context *ctx, fz_output *out, int w, int h, int n, int savealpha); +void fz_write_png_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *samples, int savealpha, fz_png_output_context *poc); +void fz_write_png_trailer(fz_context *ctx, fz_output *out, fz_png_output_context *poc); + +/* + Create a new buffer containing the image/pixmap in PNG format. +*/ +fz_buffer *fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image, int w, int h); +fz_buffer *fz_new_buffer_from_pixmap_as_png(fz_context *ctx, fz_pixmap *pixmap); #endif diff --git a/include/mupdf/fitz/output-pnm.h b/include/mupdf/fitz/output-pnm.h index 33dcde4e..ba12b807 100644 --- a/include/mupdf/fitz/output-pnm.h +++ b/include/mupdf/fitz/output-pnm.h @@ -12,24 +12,24 @@ */ void fz_save_pixmap_as_pnm(fz_context *ctx, fz_pixmap *pixmap, char *filename); -void fz_output_pnm(fz_context *ctx, fz_output *out, fz_pixmap *pixmap); -void fz_output_pnm_header(fz_context *ctx, fz_output *out, int w, int h, int n); -void fz_output_pnm_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *p); +void fz_write_pixmap_as_pnm(fz_context *ctx, fz_output *out, fz_pixmap *pixmap); +void fz_write_pnm_header(fz_context *ctx, fz_output *out, int w, int h, int n); +void fz_write_pnm_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *p); /* fz_save_pixmap_as_pam: Save a pixmap as a PAM image file. */ void fz_save_pixmap_as_pam(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha); -void fz_output_pam(fz_context *ctx, fz_output *out, fz_pixmap *pixmap, int savealpha); -void fz_output_pam_header(fz_context *ctx, fz_output *out, int w, int h, int n, int savealpha); -void fz_output_pam_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *sp, int savealpha); +void fz_write_pixmap_as_pam(fz_context *ctx, fz_output *out, fz_pixmap *pixmap, int savealpha); +void fz_write_pam_header(fz_context *ctx, fz_output *out, int w, int h, int n, int savealpha); +void fz_write_pam_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *sp, int savealpha); /* fz_save_bitmap_as_pbm: Save a bitmap as a PBM image file. */ void fz_save_bitmap_as_pbm(fz_context *ctx, fz_bitmap *bitmap, char *filename); -void fz_output_pbm(fz_context *ctx, fz_output *out, fz_bitmap *bitmap); +void fz_write_bitmap_as_pbm(fz_context *ctx, fz_output *out, fz_bitmap *bitmap); #endif diff --git a/include/mupdf/fitz/output-pwg.h b/include/mupdf/fitz/output-pwg.h index 6d399848..0bd782f6 100644 --- a/include/mupdf/fitz/output-pwg.h +++ b/include/mupdf/fitz/output-pwg.h @@ -78,21 +78,26 @@ void fz_save_bitmap_as_pwg(fz_context *ctx, fz_bitmap *bitmap, char *filename, i /* Output a pixmap to an output stream as a pwg raster. */ -void fz_output_pwg(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg); +void fz_write_pixmap_as_pwg(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg); + +/* + Output a bitmap to an output stream as a pwg raster. +*/ +void fz_write_bitmap_as_pwg(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, const fz_pwg_options *pwg); /* Output the file header to a pwg stream, ready for pages to follow it. */ -void fz_output_pwg_file_header(fz_context *ctx, fz_output *out); +void fz_write_pwg_header(fz_context *ctx, fz_output *out); /* Output a page to a pwg stream to follow a header, or other pages. */ -void fz_output_pwg_page(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg); +void fz_write_pixmap_as_pwg_page(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap, const fz_pwg_options *pwg); /* Output a bitmap page to a pwg stream to follow a header, or other pages. */ -void fz_output_pwg_bitmap_page(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, const fz_pwg_options *pwg); +void fz_write_bitmap_as_pwg_page(fz_context *ctx, fz_output *out, const fz_bitmap *bitmap, const fz_pwg_options *pwg); #endif |