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/mupdf/fitz/output-png.h | |
parent | 3afdcd7307fd5e68f35c7bb91a4d856499f1df44 (diff) | |
download | mupdf-209046c6faf046e7198cd159c232cfb885c58740.tar.xz |
Rename fz_output_x to fz_write_pixmap_as_x etc.
Diffstat (limited to 'include/mupdf/fitz/output-png.h')
-rw-r--r-- | include/mupdf/fitz/output-png.h | 27 |
1 files changed, 12 insertions, 15 deletions
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 |