Accessing Photo Metadata (IPTC specifically)
"digitalbohling" <[email protected]> Wed, 26 Jan 2005 21:16:34 -0000
| Newsgroups | gmane.comp.graphics.imatch |
|---|---|
| Message-ID | <[email protected]> |
OK, I didn't expect an answer on my long post--mainly just trying to
voice my thoughts out loud. However, now I'm starting to work on
solving my issues. First up: work on a script to export photo metadata
(IPTC) from IMatch and import into a SQL database. Below is the
beginning of that script, but I'm having problems accessing the IPTC
data. I'm sure I'm missing something obvious, your help would be
appreciated.
Code...based on object model and sample scripts:
Option Explicit
Sub Main
Dim db As Database
Dim ctgry As Category
Dim img As Image
Dim res As IMIPTCResult
Dim gblStream As New IPTCStream
Dim tmpString As String
Set db = Application.ActiveDatabase
If db Is Nothing Then
MsgBox "Please open a database first."
Exit Sub
End If
For Each ctgry In db.Categories
If ctgry.Name = "Web" Then
For Each img In ctgry.Images
res = gblStream.ReadFile(img.FileName)
If res = imiptcSuccess Then
tmpString = gblStream.Fields("Caption") & vbCrLf 'Craps out here
tmpString = tmpString & gblStream.Fields("Headline") & vbCrLf
tmpString = tmpString & gblStream.Fields("Copyright") & vbCrLf
tmpString = tmpString & gblStream.Fields("Keywords") & vbCrLf
tmpString = tmpString & gblStream.Fields("Country") & vbCrLf
MsgBox tmpString
End If
Next
End If
Next
End Sub
TIA,
--brandon
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/imatchuserforum/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/