The JPEG attribute in jfif format is read and the standard file header is read. The structure of other content must be parsed one by one. It is not done for the time being. Interested friends can continue to improve it.
Procedure tjfif. readappn; var WRD, wrd2: word; STR: string; begin WRD: = getword; while (WRD >=$ ffe1) and (WRD <= $ ffef) Do begin wrd2: = getword-2; STR: = getstring (wrd2); mmow.info. lines. add ('appn: '+ Str); WRD: = getword; end; Procedure tjfif. readj1_info; var wrdimage: word; // word read from image file dwdimage: DWORD; // double word read from image file bytimage: byte; // byte read from image file strimage: string; // string read from image file isize: integer; begin {read EXIF data size} i64refpos: = fsimage. position; wrdimage: = getword; isize: = wrdimage; mmow.info. lines. add ('jfif data size = '+ inttostr (wrdimage); {read actual EXIF header} strimage: = getstring (4 ); if strimage <> 'jfif' then exit else mmow.info. lines. add ('header: '+ strimage); // read a NULL bytes after jfif header getbyte; // get version mmow.info. lines. add ('version: '+ inttostr (getbyte) + '. '+ inttostr (getbyte); // get units bytimage: = getbyte; Case bytimage of 0: mmow.info. lines. add ('Units: none'); 1: mmow.info. lines. add ('Units: inch (DPI) '); 2: mmow.info. lines. add ('Units: cm (DPC) '); end; // xdensity mmow.info. lines. add ('xdensity: '+ inttostr (getword); // ydensity mmow.info. lines. add ('ydensity: '+ inttostr (getword); // xthumbnail mmow.info. lines. add ('xthumbnail: '+ inttostr (getbyte); // ythumbnail mmow.info. lines. add ('ythumbnail: '+ inttostr (getbyte); fsimage. position: = i64refpos + isize; readappn; end; {read information from the JPEG file}
CodeObtain the basic functions in the following blog
JPEG image attribute read EXIF