Access Exif metadata

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DGrund
    New Member
    • Jan 2017
    • 23

    #1

    Access Exif metadata

    I am trying to access the Authors fields from a picture.

    I am using System.Windows. Media.Imaging;

    My code:
    BitmapSource img = BitmapFrame.Cre ate(fs);
    BitmapMetadata md = (BitmapMetadata )img.Metadata;
    lblTitle.Text = md.Title;
    lblSubject.Text = md.Subject;
    lblAuthors.Text = md.Author; // <======
    lblComments.Tex t = md.Comment;
    lblDateTaken.Te xt = md.DateTaken;

    It doesn't like highlighted line:
    Cannot impolicitely convert type "System.Collect ions.ObjectMode l.ReadOnlyColle ction<string> to <string>.

    Evidently, I don't have a good enough grasp of C#. Can anyone help?
    Thanks in advance.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    I've moved your thread into the c# forum as it would appear it's about that language.

    Good luck :-)

    Comment

    Working...