#ifndef IMAGE_READ_H
#define IMAGE_READ_H

#include <utility>

#ifndef _MSC_VER
extern "C" {
#include <ppm.h>
#include <pm.h>
#include <pam.h>
}
  #ifndef _MSC_VER
    #define PROGNAME "pano_interface"
  #endif
#endif

#include <jpeglib.h>

enum FileType{
    PNM,
    JPEG,
    UNKNOWN
};

class FileRead{
    private:
        static enum FileType get_file_type(const char*);
    protected:
        static unsigned char *read_image(const char*,int*,int*);
    private:
        static unsigned char *jpgRead(const char*,int*,int*);
#ifndef _MSC_VER
        static unsigned char *pnmRead(const char * const,const char*,int*,int*);
#endif
};

#endif // IMAGE_READ_H
