EXIF info

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Post Reply
Andrew McIsaac
Posts: 1
Joined: Fri Nov 06, 2020 12:36 am

EXIF info

Post by Andrew McIsaac »

Good evening everyone,
Working with C++ Builder XE10.4 Enterprise, Multi-Device Target: Windows 32 bit

How do I read EXIF data of an Image File?

I have :

I specifically need the Orientation and the size of the image, Width, Height.

Thank you.
BCBJ Author
BCBJ Author
Posts: 1726
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: EXIF info

Post by rlebeau »

Width and Height are easy to get. After loading the image file, simply read the Bitmap's Width+Height, or Size, properties.

But, TBitmap does not expose access to any EXIF metadata, so you will have to parse that manually. There are plenty of EXIF libraries available for Delphi. For instance, since you are targeting Windows, you can use GDI+ for that: https://stackoverflow.com/a/41642334/65863. Or, you can just write your own parsing code, since the JPG and EXIF formats are well-documented.
Remy Lebeau (TeamB)
Lebeau Software
Post Reply