aboutsummaryrefslogtreecommitdiff
path: root/lib/libexif/ExifParse.h
blob: 94e6cd0fc2c67142ca0a1cf771e172816fa63f2a (plain)
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
38
#pragma once

#include "libexif.h"

class CExifParse
{
  public:
    CExifParse  ();
   ~CExifParse  (void)      {}
    bool        Process     (const unsigned char* const Data, const unsigned short length, ExifInfo_t *info);
    static int  Get16       (const void* const Short, const bool motorolaOrder=true);
    static int  Get32       (const void* const Long,  const bool motorolaOrder=true);

  private:
    ExifInfo_t *m_ExifInfo;
    double      m_FocalPlaneXRes;
    double      m_FocalPlaneUnits;
    unsigned    m_LargestExifOffset;          // Last exif data referenced (to check if thumbnail is at end)
    int         m_ExifImageWidth;
    bool        m_MotorolaOrder;
    bool        m_DateFound;

//    void    LocaliseDate        (void);
//    void    GetExposureTime     (const float exposureTime);
    double  ConvertAnyFormat    (const void* const ValuePtr, int Format);
    void    ProcessDir          (const unsigned char* const DirStart,
                                 const unsigned char* const OffsetBase,
                                 const unsigned ExifLength, int NestingLevel);
    void    ProcessGpsInfo      (const unsigned char* const DirStart,
                                 int ByteCountUnused,
                                 const unsigned char* const OffsetBase,
                                 unsigned ExifLength);
    void    GetLatLong          (const unsigned int Format,
                                 const unsigned char* ValuePtr,
                                 const int ComponentSize,
                                 char *latlongString);
};