output-png.h 1019 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef MUPDF_FITZ_OUTPUT_PNG_H
  2. #define MUPDF_FITZ_OUTPUT_PNG_H
  3. #include "mupdf/fitz/system.h"
  4. #include "mupdf/fitz/context.h"
  5. #include "mupdf/fitz/output.h"
  6. #include "mupdf/fitz/band-writer.h"
  7. #include "mupdf/fitz/pixmap.h"
  8. #include "mupdf/fitz/bitmap.h"
  9. #include "mupdf/fitz/buffer.h"
  10. #include "mupdf/fitz/image.h"
  11. /*
  12. fz_save_pixmap_as_png: Save a pixmap as a PNG image file.
  13. */
  14. void fz_save_pixmap_as_png(fz_context *ctx, fz_pixmap *pixmap, const char *filename);
  15. /*
  16. Write a pixmap to an output stream in PNG format.
  17. */
  18. void fz_write_pixmap_as_png(fz_context *ctx, fz_output *out, const fz_pixmap *pixmap);
  19. /*
  20. fz_new_png_band_writer: Obtain a fz_band_writer instance
  21. for producing PNG output.
  22. */
  23. fz_band_writer *fz_new_png_band_writer(fz_context *ctx, fz_output *out);
  24. /*
  25. Create a new buffer containing the image/pixmap in PNG format.
  26. */
  27. fz_buffer *fz_new_buffer_from_image_as_png(fz_context *ctx, fz_image *image);
  28. fz_buffer *fz_new_buffer_from_pixmap_as_png(fz_context *ctx, fz_pixmap *pixmap);
  29. #endif