Listing all properties

Sep 22, 2010 at 10:33 PM
Edited Sep 22, 2010 at 10:35 PM

Is there a way to enumerate ALL the properties and their values in a given photo?  I started out with the following code but it immediately complained about photo.Metadata not being a collection type.  Any suggestions?

Dim photo As New JpgPhoto(imagePath)

For Each prop As String In photo.Metadata

    Dim tagName As String = prop.FullName

    Dim item As New ListViewItem

(tagName)

    lvResults.Items.Add(item

next prop

 

Coordinator
Jan 3, 2011 at 6:25 PM

Hi,

Sorry for the not replying soon (been moving job, state and getting married).

There's no way to do this on JpgPhoto, that's something I should look at adding, but you can do something like this:

MetadataDump dump;

using (WpfFileManager wpfFileManager = new WpfFileManager (beforePhoto.FileFullName)) 

{

dump = new MetadataDump (wpfFileManager.BitmapMetadata); 

dump.GenerateStringList();

}