Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#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