diff options
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 |