It\'s quite easy setting the GPS coordinates using the GPSLatitude and GPSLatitude properties Assign method, but reading the coords has me stumped. I\'ve trying to access th
Looking in depth at the source, it seems one can use the "Quotient" property. In stead of storing the decimal float, the developer chose to store the components Numerator, Denominator and Quotient.
I don't think it's how it's meant to be used, but it's working! Thanks for everyone's time.
So, to read the GPS Coordinates from a JPG file using CCR.EXIF, I do the following:
var
imgJpg: TJpegImageEx;
d,m,s,lat: real;
imgJpg.LoadFromFile(FolderName+'\'+SR.Name); {Load the particular JPG File }
d:= imgJpg.ExifData.GPSLatitude.Degrees.Quotient; {Degrees}
m:= imgJpg.ExifData.GPSLatitude.Minutes.Quotient; {Minutes}
s:= imgJpg.ExifData.GPSLatitude.Seconds.Quotient; {Seconds}
{Now determine the sign}
if imgJpg.ExifData.GPSLatitude.Direction=ltNorth then
ref:= 1
else
ref:= -1;
{Convert to decimal}
lat:= ref*(d+(m/60)+(s/60/60));
lat now contains the latitude. Same can be done for long of course.