9 #define MAX_COMMENT 1000
10 #define MAX_SECTIONS 20
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];
32 float CCDWidth; //in milimeters
35 float FocalplaneUnits;
37 float ApertureFNumber;
43 unsigned char * ThumbnailPointer;
44 unsigned ThumbnailSize;
48 static const int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
52 typedef struct tag_Section_t{
59 char m_szLastError[256];
62 bool DecodeExif(const char *filename);
65 bool process_EXIF(unsigned char * CharBuf, unsigned int length);
66 void process_COM (const unsigned char * Data, int length);
67 void process_SOFn (const unsigned char * Data, int marker);
68 int Get16u(void * Short);
69 int Get16m(void * Short);
70 long Get32s(void * Long);
71 unsigned long Get32u(void * Long);
72 double ConvertAnyFormat(void * ValuePtr, int Format);
73 bool ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBase, unsigned ExifLength, EXIFINFO * const pInfo, unsigned char ** const LastExifRefdP);
76 Section_t Sections[MAX_SECTIONS];