18 #ifndef PIC_IO_STB_HPP 19 #define PIC_IO_STB_HPP 24 #include "../base.hpp" 27 #ifndef PIC_DISABLE_STB 30 #define STBIWDEF inline 31 #define STB_IMAGE_STATIC 32 #define STB_IMAGE_WRITE_STATIC 33 #define STB_IMAGE_WRITE_IMPLEMENTATION 34 #define STB_IMAGE_IMPLEMENTATION 36 #ifndef PIC_DISABLE_STB_LOCAL 37 #include "../../stb/stb_image_write.h" 38 #include "../../stb/stb_image.h" 40 #include <stb/stb_image_write.h> 41 #include <stb/stb_image.h> 58 int &height,
int &channels)
60 unsigned char *data = NULL;
62 #ifndef PIC_DISABLE_STB 64 stbi_info(nameFile.c_str(), &w, &h, &c);
65 data = stbi_load(nameFile.c_str(), &width, &height, &channels, c);
85 #ifndef PIC_DISABLE_STB 86 tmp = stbi_write_png(nameFile.c_str(), width, height, channels, (
void*) data, 0);
PIC_INLINE unsigned char * ReadSTB(std::string nameFile, int &width, int &height, int &channels)
ReadSTB.
Definition: stb.hpp:57
#define PIC_INLINE
Definition: base.hpp:33
Definition: bilateral_separation.hpp:25
PIC_INLINE bool WriteSTB(std::string nameFile, unsigned char *data, int width, int height, int channels=3)
WriteSTB.
Definition: stb.hpp:80