output-tga.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef MUPDF_FITZ_OUTPUT_TGA_H
  2. #define MUPDF_FITZ_OUTPUT_TGA_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. /*
  9. fz_save_pixmap_as_tga: Save a pixmap as a TGA image file.
  10. Can accept RGB, BGR or Grayscale pixmaps, with or without
  11. alpha.
  12. */
  13. void fz_save_pixmap_as_tga(fz_context *ctx, fz_pixmap *pixmap, const char *filename);
  14. /*
  15. Write a pixmap to an output stream in TGA format.
  16. Can accept RGB, BGR or Grayscale pixmaps, with or without
  17. alpha.
  18. */
  19. void fz_write_pixmap_as_tga(fz_context *ctx, fz_output *out, fz_pixmap *pixmap);
  20. /*
  21. fz_new_tga_band_writer: Generate a new band writer for TGA
  22. format images. Note that image must be generated vertically
  23. flipped for use with this writer!
  24. Can accept RGB, BGR or Grayscale pixmaps, with or without
  25. alpha.
  26. is_bgr: True, if the image is generated in bgr format.
  27. */
  28. fz_band_writer *fz_new_tga_band_writer(fz_context *ctx, fz_output *out, int is_bgr);
  29. #endif