diff --git a/IO/config/ImageLoader.h.in b/IO/config/ImageLoader.h.in index d76731a..cf447cf 100644 --- a/IO/config/ImageLoader.h.in +++ b/IO/config/ImageLoader.h.in @@ -1,11 +1,7 @@ #ifndef _IMAGE_LOADER_H_ #define _IMAGE_LOADER_H_ -enum EImageFileFormat { - eFileFormat_PNG, - - kNumImageFileFormats -}; +#include "ImageFileFormat.h" class ImageLoader { diff --git a/IO/include/ImageFile.h b/IO/include/ImageFile.h index 34d6593..ea10efe 100644 --- a/IO/include/ImageFile.h +++ b/IO/include/ImageFile.h @@ -1,7 +1,7 @@ #ifndef _IMAGE_FILE_H_ #define _IMAGE_FILE_H_ -#include "ImageLoader.h" +#include "ImageFileFormat.h" class ImageFile { diff --git a/IO/include/ImageFileFormat.h b/IO/include/ImageFileFormat.h new file mode 100644 index 0000000..ab9a9ca --- /dev/null +++ b/IO/include/ImageFileFormat.h @@ -0,0 +1,10 @@ +#ifndef _IMAGE_FILE_FORMAT_H_ +#define _IMAGE_FILE_FORMAT_H_ + +enum EImageFileFormat { + eFileFormat_PNG, + + kNumImageFileFormats +}; + +#endif // _IMAGE_FILE_FORMAT_H_ diff --git a/IO/src/ImageFile.cpp b/IO/src/ImageFile.cpp index ab5e623..24bcca8 100644 --- a/IO/src/ImageFile.cpp +++ b/IO/src/ImageFile.cpp @@ -5,6 +5,7 @@ #include #include "ImageFile.h" +#include "ImageLoader.h" #ifdef PNG_FOUND # include "ImageLoaderPNG.h" @@ -149,6 +150,9 @@ EImageFileFormat ImageFile::DetectFileFormat(const char *filename) { // !FIXME! Report Error..... return kNumImageFileFormats; } + + // consume the last character... + dotPos++; const char *ext = &filename[dotPos];