Author Topic: [Help]Get Image Tag(EXIF)  (Read 4131 times)

0 Members and 1 Guest are viewing this topic.

KRAZ

  • Newt
  • Posts: 49
  • Find something that are not in the world ~
[Help]Get Image Tag(EXIF)
« on: March 28, 2012, 10:49:37 PM »
Hello Swamps~~

I want to get tag attribute from jpg image.
some jpg image has tags(EXIF).
In my opinion, I'll need some activex library.

Thanks in advance...
=================================
GIS, Urban, World, Visible or Invisible, Curious,
==================================

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: [Help]Get Image Tag(EXIF)
« Reply #1 on: March 29, 2012, 10:28:17 AM »
Can't readily find any such thing for a late-binding ActiveX library (only OCX components to place on VB forms). However, there's an example using DotNet: http://msdn.microsoft.com/en-us/library/xddt0dz7.aspx
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

KRAZ

  • Newt
  • Posts: 49
  • Find something that are not in the world ~
Re: [Help]Get Image Tag(EXIF)
« Reply #2 on: March 29, 2012, 10:37:24 AM »
Can't readily find any such thing for a late-binding ActiveX library (only OCX components to place on VB forms). However, there's an example using DotNet: http://msdn.microsoft.com/en-us/library/xddt0dz7.aspx


thanks for ur link...but i can't understand... :cry:
=================================
GIS, Urban, World, Visible or Invisible, Curious,
==================================

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: [Help]Get Image Tag(EXIF)
« Reply #3 on: March 31, 2012, 05:59:19 AM »
Sorry ... I don't either  :lmao: .  Just kidding!  >:D I meant that you'd need to create something like this in VB.Net/C# - there are ways to then have it interoperate with lisp.

I've done some more googling, it seems there is an OpenSource one: SImage. Basically it's a DLL which you'll need to register using a windows command-line (CMD console):
Code: [Select]
regsrv32 SImageUtil.dllThereafter you can use
Code: [Select]
(vlax-get-or-create-object "SImageUtil.Image")To obtain a link to this utility. Then the normal vlax-get/put/invoke methods should work.

I haven't tested it myself, but from the documentation it does have a GetExif & DumpExif method.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

KRAZ

  • Newt
  • Posts: 49
  • Find something that are not in the world ~
Re: [Help]Get Image Tag(EXIF)
« Reply #4 on: March 31, 2012, 09:02:18 AM »
Sorry ... I don't either  :lmao: .  Just kidding!  >:D I meant that you'd need to create something like this in VB.Net/C# - there are ways to then have it interoperate with lisp.

I've done some more googling, it seems there is an OpenSource one: SImage. Basically it's a DLL which you'll need to register using a windows command-line (CMD console):
Code: [Select]
regsrv32 SImageUtil.dllThereafter you can use
Code: [Select]
(vlax-get-or-create-object "SImageUtil.Image")To obtain a link to this utility. Then the normal vlax-get/put/invoke methods should work.

I haven't tested it myself, but from the documentation it does have a GetExif & DumpExif method.


thanks irneb
but it doesn't support GPS coordinates....anyway thanks a lot
=================================
GIS, Urban, World, Visible or Invisible, Curious,
==================================

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: [Help]Get Image Tag(EXIF)
« Reply #5 on: March 31, 2012, 10:49:24 AM »
Sorry that it doesn't work in your case. Perhaps some other might do. The Google search terms I used was
Quote
vbscript exif
Since vbscript usually uses ActiveX late-binding libraries, it usually gives the best results for searching ActiveX creatable objects.

An alternative would be to study up on the Exif spec. (also http://www.media.mit.edu/pia/Research/deepview/exif.html) I.e. figure out exactly how to read the Exif data in its raw format from the file. The problem here is that lisp doesn't have a binary file utilities. I've come across another thread previously where Lee Mac has created a lisp which does read the binary values into lists of integers though, perhaps that might suffice: http://www.theswamp.org/index.php?topic=39814.0

He's basically using the ADODB.Stream ActiveX library to read the file and return the binary codes from it. Thus you can then search such list for the relevant start position of the Exif marker inside the JPG (0x8825 = (136 37)). That would be followed by a byte showing the length of the field (in it's entirety including the 2 bytes for marker & size). Then followed by the data itself.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

KRAZ

  • Newt
  • Posts: 49
  • Find something that are not in the world ~
Re: [Help]Get Image Tag(EXIF)
« Reply #6 on: April 01, 2012, 02:32:16 AM »
Sorry that it doesn't work in your case. Perhaps some other might do. The Google search terms I used was
Quote
vbscript exif
Since vbscript usually uses ActiveX late-binding libraries, it usually gives the best results for searching ActiveX creatable objects.

An alternative would be to study up on the Exif spec. (also http://www.media.mit.edu/pia/Research/deepview/exif.html) I.e. figure out exactly how to read the Exif data in its raw format from the file. The problem here is that lisp doesn't have a binary file utilities. I've come across another thread previously where Lee Mac has created a lisp which does read the binary values into lists of integers though, perhaps that might suffice: http://www.theswamp.org/index.php?topic=39814.0

He's basically using the ADODB.Stream ActiveX library to read the file and return the binary codes from it. Thus you can then search such list for the relevant start position of the Exif marker inside the JPG (0x8825 = (136 37)). That would be followed by a byte showing the length of the field (in it's entirety including the 2 bytes for marker & size). Then followed by the data itself.

your advice is very helpful for me...thanks irneb. you are very nice... :wink:
=================================
GIS, Urban, World, Visible or Invisible, Curious,
==================================

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: [Help]Get Image Tag(EXIF)
« Reply #7 on: April 02, 2012, 08:15:03 AM »
Pleasure!
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.