stb_image_write.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef INCLUDE_STB_IMAGE_WRITE_H
  2. #define INCLUDE_STB_IMAGE_WRITE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifdef STB_IMAGE_WRITE_STATIC
  7. #define STBIWDEF static
  8. #else
  9. #define STBIWDEF extern
  10. extern int stbi_write_tga_with_rle;
  11. #endif
  12. #ifndef STBI_WRITE_NO_STDIO
  13. STBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
  14. STBIWDEF int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
  15. STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
  16. STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
  17. #endif
  18. typedef void stbi_write_func(void *context, void *data, int size);
  19. STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes);
  20. STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
  21. STBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data);
  22. STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
  23. #ifdef __cplusplus
  24. }
  25. #endif
  26. #endif//INCLUDE_STB_IMAGE_WRITE_H