locked
How can I retrieve IPTC info from a jpg RRS feed

  • Question

  • User1080340250 posted

    Iève seen this questions aksed over a dozen times ont hsi site, but there's never been a lcear answer.  Iève been searchign for a few hours now and the closest I got was a C# example but when I tried to convert it to VB, all I got was gibberish.  Has anyone got a script?  Just to show i've done my homework, i've managed to read the EXIF.

           Dim strFileName As String = Server.MapPath("photos\090624-GBRA-6744H-002.jpg")


    Dim fs As New FileStream(strFileName, FileMode.Open, FileAccess.Read, FileShare.Read)

    Dim img As BitmapSource = BitmapFrame.Create(fs)

    Dim meta As BitmapMetadata = DirectCast(img.Metadata, BitmapMetadata)


    Dim keyWord As String = ""
    Dim kString As String = ""

    Dim Author As String = ""
    Dim aString As String = ""

    For Each kString In meta.Keywords
    keyWord += kString & "; "
    Next

    For Each aString In meta.Author
    Author += aString
    Next

    lblTitle.Text = meta.Title
    lblLocation.Text = meta.Location
    lblSubject.Text = meta.Subject
    lblAuthor.Text = Author
    lblCopyright.Text = meta.Copyright
    lblDateTaken.Text = meta.DateTaken

    lblKeywords.Text = keyWord


    fs.Close()
    fs = Nothing


    Thx in  advance!

    Wednesday, August 19, 2009 3:10 PM