ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to check if EXIF has GPS data?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Patrick Quinn Posted - Jul 22 2011 : 14:03:33
I need a way of checking if an image's EXIF data contains GPS data.
A boolean property like TIOParams.EXIF_HasEXIFData would be ideal. (A new property called TIOParams.EXIF_GPSHasGPSData perhaps?).

Is there an easy way of doing this?

As a workround I am checking that (EXIF_GPSLatitudeDegrees > 0) and (EXIF_GPSLongditudeDegrees > 0). This works but is a bit crude.

Thank you for an excellent product

regards

Patrick
13   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 15 2012 : 19:51:19
Thanks Murat

We have updated the page.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Murat Posted - May 15 2012 : 02:14:15
Hi Fabrizio,

Does the latest ImageEN version support reading EXIF from PSD format?

If not, please remove the information on your Info page:
"Loading and saving of digital camera (EXIF) fields in JPEG, TIFF, RAW, PSD and HD Photo files (without modifying the original image)"

-
Murat
fab Posted - Jul 29 2011 : 07:11:19
ImageEn cannot read EXIF from (or write to) PSD files.
User Posted - Jul 29 2011 : 02:41:15
Line 340:
EXIF_COMPATIBLE_EXTENSIONS='*.TIF;*.TIFF;*.JPE;*.JPG;*.JPEG;'+_RAW_CAMERA_FORMATS;

What about PSD?
Patrick Quinn Posted - Jul 27 2011 : 04:04:16
quote:
Hi Patrick

It is available at:

http://www.imageen.com/files/other/xieiptcglobals.zip


Thanks, Nigel

regards

Patrick
xequte Posted - Jul 27 2011 : 03:33:06
Hi Patrick

It is available at:

http://www.imageen.com/files/other/xieiptcglobals.zip



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Patrick Quinn Posted - Jul 26 2011 : 00:35:50
quote:
Thanks. I have a similar one for IPTC field support too.


Hi Nigel.

I would greatly appreciate if I you could put this in the download section as well. Many of the IPTC fields look very useful.




regards

Patrick
xequte Posted - Jul 25 2011 : 12:37:32
Thanks. I have a similar one for IPTC field support too.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Patrick Quinn Posted - Jul 24 2011 : 06:06:54
Thanks, Nigel.

quote:
The only other main function of use is the ability to read/write all EXIF fields of an image from/to a string grid.

That's exactly what I am doing at the moment, your code will be useful.

regards

Patrick
xequte Posted - Jul 24 2011 : 03:10:14
Hi Patrick

As requested you can download the unit from:

http://www.imageen.com/files/other/xieexifglobals.zip


The only other main function of use is the ability to read/write all EXIF fields of an image from/to a string grid.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Patrick Quinn Posted - Jul 23 2011 : 07:38:11
Apologies
Thank you, Nigel, for your quick reponse.

regards

Patrick
Patrick Quinn Posted - Jul 23 2011 : 07:35:49
Thank you, xequte, for your quick reponse. That is just what I need.

I have a unit to handle all my EXIF tasks.
Any possibility of putting this in the downloads section?

regards

Patrick
xequte Posted - Jul 22 2011 : 22:48:30
Hi Patrick

I have a unit to handle all my EXIF tasks. Here are the relevant GPS ones:


function DegreesMinutesSecondsToDecimal(dDeg, dMin, dSec: Double): Extended;
begin
  Result := dDeg + (dMin / 60) + (dSec / 3600);
end;


function GPSAsDecimal(const dGPSDegrees, dGPSMinutes, dGPSSeconds: Double; const sGPSReference: string): Extended;
begin
  Result := DegreesMinutesSecondsToDecimal(dGPSDegrees, dGPSMinutes, dGPSSeconds);

  if SameText(RemoveNull(sGPSReference), 'S') or
     SameText(RemoveNull(sGPSReference), 'W') then
    Result := -1 * Result;
end;

function GPSLatitudeDecimal(AParams: TIOParams): Extended;
begin
  with AParams do
    Result := GPSAsDecimal(EXIF_GPSLatitudeDegrees, EXIF_GPSLatitudeMinutes, EXIF_GPSLatitudeSeconds, EXIF_GPSLatitudeRef);
end;

function GPSLongitudeDecimal(AParams: TIOParams): Extended;
begin
  with AParams do
    Result := GPSAsDecimal(EXIF_GPSLongitudeDegrees, EXIF_GPSLongitudeMinutes, EXIF_GPSLongitudeSeconds, EXIF_GPSLongitudeRef);
end;



function HasExifGPSData(AParams: TIOParams): Extended;
begin
  Result := (GPSLatitudeDecimal(AParams) <> 0) or
            (GPSLongitudeDecimal(AParams) <> 0)
end;



// return the GPS fields from the exif fields
function ExifGPSData(sFilename: string;
                     AnImageEnIO:TImageENIO;
                     out xGPSLatitudeDegrees: Extended;
                     out xGPSLongitudeDegrees: Extended
                     ): Boolean;
begin
  result := False;
  xGPSLatitudeDegrees  := 0;
  xGPSLongitudeDegrees := 0;

  if IsJPEG(sFilename, TRUE) then
  try
      // use get params from file to fill the _ImageEnIO with the EXIF data
    AnImageEnIO.paramsfromfile(sFilename);

    if AnImageEnIO.params.EXIF_HasEXIFData then
    begin
      xGPSLatitudeDegrees  := GPSLatitudeDecimal(AnImageEnIO.Params);
      xGPSLongitudeDegrees := GPSLongitudeDecimal(AnImageEnIO.Params);
    end;

    Result := (xGPSLatitudeDegrees <> 0) or (xGPSLongitudeDegrees <> 0);

  except
    // ERROR
  end;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com