To get EXIF information from an image file in Delphi, you can use the TExifData class from the Vcl.Imaging.Jpeg unit of the Delphi VCL. This class provides properties and methods that allow you to read and write EXIF metadata from and to JPEG image files.
Here is an example of how you can use the TExifData class in Delphi to get EXIF information from an image file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
uses System.SysUtils, Vcl.Imaging.Jpeg; var ExifData TExifData; begin Load the image file ExifData = TExifData.Create; try ExifData.LoadFromGraphic(TJPEGImage.Create); //Get the EXIF information Writeln(‘Image Description ‘, ExifData.ImageDescription); Writeln(‘Make ‘, ExifData.Make); Writeln(‘Model ‘, ExifData.Model); Writeln(‘DateTime ‘, ExifData.DateTime); Writeln(‘Width ‘, ExifData.ExifImageWidth); Writeln(‘Height ‘, ExifData.ExifImageHeight); finally ExifData.Free; end; end. |
This code sample uses the TExifData class to read the EXIF metadata from a JPEG image file and access the values of some of the EXIF properties, such as the image description, make and model of file.
Leave a Reply