18 #ifndef PIC_UTIL_IO_HPP 19 #define PIC_UTIL_IO_HPP 23 #include "../base.hpp" 27 enum LABEL_IO_EXTENSION {
IO_TMP,
IO_PFM,
IO_HDR,
IO_EXR,
IO_VOL,
IO_BMP,
IO_PPM,
IO_TGA,
IO_JPG,
IO_PNG,
IO_PGM,
IO_NULL};
36 size_t posTMP = nameFile.find(
".tmp");
38 if(posTMP != std::string::npos) {
42 size_t posPFM = nameFile.find(
".pfm");
44 if(posPFM != std::string::npos) {
48 size_t posHDR = nameFile.find(
".hdr");
50 if(posHDR != std::string::npos) {
54 size_t posPIC = nameFile.find(
".pic");
56 if(posPIC != std::string::npos) {
60 size_t posEXR = nameFile.find(
".exr");
62 if(posEXR != std::string::npos) {
66 size_t posVOL = nameFile.find(
".vol");
68 if(posVOL != std::string::npos) {
82 size_t posBMP = nameFile.find(
".bmp");
84 if(posBMP != std::string::npos) {
88 size_t posPPM = nameFile.find(
".ppm");
90 if(posPPM != std::string::npos) {
94 size_t posPGM = nameFile.find(
".pgm");
96 if(posPGM != std::string::npos) {
100 size_t posTGA = nameFile.find(
".tga");
102 if(posTGA != std::string::npos) {
106 size_t posJPG = nameFile.find(
".jpg");
108 if(posJPG != std::string::npos) {
112 posJPG = nameFile.find(
".JPG");
114 if(posJPG != std::string::npos) {
118 posJPG = nameFile.find(
".jpeg");
120 if(posJPG != std::string::npos) {
124 size_t posPNG = nameFile.find(
".png");
126 if(posPNG != std::string::npos) {
#define PIC_INLINE
Definition: base.hpp:33
PIC_INLINE LABEL_IO_EXTENSION getLabelHDRExtension(std::string nameFile)
getLabelHDRExtension returns the file label given its file name (for HDR images). ...
Definition: io.hpp:34
Definition: bilateral_separation.hpp:25
LABEL_IO_EXTENSION
Definition: io.hpp:27
PIC_INLINE LABEL_IO_EXTENSION getLabelLDRExtension(std::string nameFile)
getLabelHDRExtension returns the file label given its file name (for LDR images). ...
Definition: io.hpp:80