summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/output-png.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-11 21:10:21 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-12 12:37:48 +0100
commit80308eae9964e71b66a18f3de6ebcd2ebf0d306b (patch)
tree6aa51f6f53fca59d3c7afcb727f36cf627249e7a /include/mupdf/fitz/output-png.h
parent7de80f5eea6c9475b1db2b4fd905fd69ed3795e7 (diff)
downloadmupdf-80308eae9964e71b66a18f3de6ebcd2ebf0d306b.tar.xz
Regularize band writer interface.
We have various functions that, for different image formats, write a header, then a band, then (sometimes) a trailer. Push them all through a single interface. This change also fixes potential problems caused by the trailer writing being an implicit destructor, which can cause problems in cleanup code if the trailer writing throws an error.
Diffstat (limited to 'include/mupdf/fitz/output-png.h')
-rw-r--r--include/mupdf/fitz/output-png.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/mupdf/fitz/output-png.h b/include/mupdf/fitz/output-png.h
index d98d7c7f..60283c7c 100644
--- a/include/mupdf/fitz/output-png.h
+++ b/include/mupdf/fitz/output-png.h
@@ -20,11 +20,11 @@ void fz_save_pixmap_as_png(fz_context *ctx, fz_pixmap *pixmap, const char *filen
*/
void fz_write_pixmap_as_png(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap);
-typedef struct fz_png_output_context_s fz_png_output_context;
-
-fz_png_output_context *fz_write_png_header(fz_context *ctx, fz_output *out, int w, int h, int n, int alpha);
-void fz_write_png_band(fz_context *ctx, fz_output *out, fz_png_output_context *poc, int stride, int band_start, int bandheight, unsigned char *samples);
-void fz_write_png_trailer(fz_context *ctx, fz_output *out, fz_png_output_context *poc);
+/*
+ fz_new_png_band_writer: Obtain a fz_band_writer instance
+ for producing PNG output.
+*/
+fz_band_writer *fz_new_png_band_writer(fz_context *ctx, fz_output *out);
/*
Create a new buffer containing the image/pixmap in PNG format.