• Image Metadata Retrieval

    • This topic has 3 replies, 2 voices, and was last updated 6 years ago.
    Author
    Topic
    #1484144

    Can anyone point me to an article or example of how to retrieve image metadata using VBA in Access?

    Viewing 2 reply threads
    Author
    Replies
    • #1502436

      To import metadata into Access I use ExifToolgui (a gui for ExifTool). That allows you to export selected EXIF and XMP data into a file. I then use a VBA script to read it and put it into a table. This creates a file with a lot of metadata like this:

      ======== DSC_3017.JPG
      —- File —-
      FileName                        : DSC_3017.JPG
      Directory                       : .
      FileSize                        : 13 MB
      FileModifyDate                  : 2018:09:10 12:06:12+01:00
      FilePermissions                 : rw-rw-rw-
      FileType                        : JPEG
      MIMEType                        : image/jpeg
      ExifByteOrder                   : Little-endian (Intel, II)
      CurrentIPTCDigest               : 8823f30ba6f7e40ae79fa2cc81398b0e
      ImageWidth                      : 6016
      ImageHeight                     : 4016
      EncodingProcess                 : Baseline DCT, Huffman coding
      BitsPerSample                   : 8
      ColorComponents                 : 3
      YCbCrSubSampling                : YCbCr4:2:2 (2 1)
      —- EXIF —-
      Make                            : NIKON CORPORATION
      Model                           : NIKON D750
      Orientation                     : Horizontal (normal)
      XResolution                     : 300
      YResolution                     : 300

      I think trying to write something yourself would be very difficult – when I was investigating how to do it, there weren’t many programs available. Remember too, that if you add metadata (captions, keywords etc.), the software you use may well put that data into a separate file, not in the image. Google for ExifTool (and ExifToolgui – a separate program) to get an idea of what trying to do your own thing might entail. I can supply some code if you want to go down that path.

      Eliminate spare time: start programming PowerShell

    • #1516262

      Thanks so much for your response. Between my post and your response I ran across a great vba example (http://www.everythingaccess.com/exifgps ) posted by Wayne Phillips (EverythingAccess.com) . Your observation that it would be a difficult task to write this from scratch was spot-on, but with Wayne’s example I was able to get the geocoding info immediately.  Additionally his approach of using GPSExifProperties, makes it simple to add any of the many other EXIF tags potentially available in an image file.

      Thanks again.

    • #1536448

      Glad you were able to get something you wanted. Interesting that there doesn’t seem to be much on it. I think I’ll keep to my system – that database looks complicated. I can select a number of files and extract the data into one text file, then use VBA to parse it. This seems to be one file at a time, but I suspect that it can be modified to do more than one. I may have a play with it!

      Eliminate spare time: start programming PowerShell

    Viewing 2 reply threads
    Reply To: Image Metadata Retrieval

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: