]> rtime.felk.cvut.cz Git - hornmich/skoda-qr-demo.git/blob - QRScanner/mobile/jni/include/mupdf/fitz/output-png.h
Add MuPDF native source codes
[hornmich/skoda-qr-demo.git] / QRScanner / mobile / jni / include / mupdf / fitz / output-png.h
1 #ifndef MUPDF_FITZ_OUTPUT_PNG_H
2 #define MUPDF_FITZ_OUTPUT_PNG_H
3
4 #include "mupdf/fitz/system.h"
5 #include "mupdf/fitz/context.h"
6 #include "mupdf/fitz/output.h"
7 #include "mupdf/fitz/pixmap.h"
8 #include "mupdf/fitz/bitmap.h"
9
10 #include "mupdf/fitz/buffer.h"
11 #include "mupdf/fitz/image.h"
12
13 /*
14         fz_write_png: Save a pixmap as a png
15
16         filename: The filename to save as (including extension).
17 */
18 void fz_write_png(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha);
19
20 /*
21         Output a pixmap to an output stream as a png.
22 */
23 void fz_output_png(fz_output *out, const fz_pixmap *pixmap, int savealpha);
24
25 /*
26         Get an image as a png in a buffer.
27 */
28 fz_buffer *fz_new_png_from_image(fz_context *ctx, fz_image *image, int w, int h);
29
30 fz_buffer *fz_new_png_from_pixmap(fz_context *ctx, fz_pixmap *pixmap);
31
32 typedef struct fz_png_output_context_s fz_png_output_context;
33
34 fz_png_output_context *fz_output_png_header(fz_output *out, int w, int h, int n, int savealpha);
35
36 void fz_output_png_band(fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *samples, int savealpha, fz_png_output_context *poc);
37
38 void fz_output_png_trailer(fz_output *out, fz_png_output_context *poc);
39
40 #endif