8 //--------------------------------------------------------------------------
9 // JPEG markers consist of one or more 0xFF bytes, followed by a marker
10 // code byte (which is not an FF). Here are the marker codes of interest
11 // in this application.
12 //--------------------------------------------------------------------------
14 #define M_SOF0 0xC0 // Start Of Frame N
15 #define M_SOF1 0xC1 // N indicates which compression process
16 #define M_SOF2 0xC2 // Only SOF0-SOF2 are now in common use
18 #define M_SOF5 0xC5 // NB: codes C4 and CC are NOT SOF markers
27 #define M_SOI 0xD8 // Start Of Image (beginning of datastream)
28 #define M_EOI 0xD9 // End Of Image (end of datastream)
29 #define M_SOS 0xDA // Start Of Scan (begins compressed data)
30 #define M_JFIF 0xE0 // Jfif marker
31 #define M_EXIF 0xE1 // Exif marker
32 #define M_COM 0xFE // COMment
36 #define M_IPTC 0xED // IPTC marker
48 ~CJpegParse(void) = default;
49 bool Process(const char *picFileName
);
50 const ExifInfo_t
* GetExifInfo() const { return &m_ExifInfo
; }
51 const IPTCInfo_t
* GetIptcInfo() const { return &m_IPTCInfo
; }
54 bool ExtractInfo(XFILE::CFile
& infile
);
55 bool GetSection(XFILE::CFile
& infile
, const unsigned short sectionLength
);
56 void ReleaseSection(void);
57 void ProcessSOFn(void);
59 unsigned char* m_SectionBuffer
;
60 ExifInfo_t m_ExifInfo
;
61 IPTCInfo_t m_IPTCInfo
;