9 #define MAX_COMMENT 1000
10 #define MAX_SECTIONS 20
11 #define THUMBNAILTMPFILE "/tmp/.thumbcache"
13 typedef struct tag_ExifInfo {
16 char CameraModel [40];
18 char Orientation [20];
19 char MeteringMode [30];
20 char Comments[MAX_COMMENT];
23 char ResolutionUnit [20];
24 char ExposureProgram[30];
25 char LightSource [20];
35 float FocalplaneUnits;
37 float ApertureFNumber;
43 //unsigned char *ThumbnailPointer;
44 //unsigned ThumbnailSize;
49 static const int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
53 typedef struct tag_Section_t{
60 char m_szLastError[256];
63 bool DecodeExif(const char *filename, int Thumb=0);
66 bool process_EXIF(unsigned char * CharBuf, unsigned int length);
67 void process_COM (const unsigned char * Data, int length);
68 void process_SOFn (const unsigned char * Data, int marker);
69 int Get16u(void * Short);
70 int Get16m(void * Short);
71 long Get32s(void * Long);
72 unsigned long Get32u(void * Long);
73 double ConvertAnyFormat(void * ValuePtr, int Format);
74 bool ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, EXIFINFO * const pInfo, unsigned char ** const LastExifRefdP);
77 Section_t Sections[MAX_SECTIONS];