473,399 Members | 3,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Access Exif metadata

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

I am using System.Windows.Media.Imaging;

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

It doesn't like highlighted line:
Cannot impolicitely convert type "System.Collections.ObjectModel.ReadOnlyCollection <string> to <string>.

Evidently, I don't have a good enough grasp of C#. Can anyone help?
Thanks in advance.
Dec 6 '21 #1
1 10902
NeoPa
32,556 Expert Mod 16PB
I've moved your thread into the c# forum as it would appear it's about that language.

Good luck :-)
Dec 13 '21 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: www.dartszeeland.nl | last post by:
Hi all, How can I access the metadata (IPTC, EXIF) in a .jpg file? visual basic v6 Please advice me Thanks in advance, Peter.
2
by: Ivan Herman | last post by:
A question on using the PIL library. If I take a jpg file then, say, resize it and save it somewhere else, all metadata that is part of the jpg file is lost. This is a pity: digital cameras...
0
by: Patrick Johnson | last post by:
I am trying to read the Keyword field of the metadata attached to a jpg file in C#. the closest I could find to reading this type of Info was using the Image object and itterating thru the...
1
by: Reginald Johnson | last post by:
I'm trying display a popup on the mouseover of a jpeg image. I'm thinking of trying to populate the popup with text obtained from the image metadata. However, I haven't been able to find any...
14
by: Frank | last post by:
I see that ImageFormat includes exif. But I can't find out if I've System.Drawing.Image.FromStream or something like it can read and/or write that format.
8
by: infoseekar | last post by:
Does anyone know what's the right code to read IPTC metadata. I have the code to read EXIF metadata and it gives me alot of information which I don't need. How do I modify this code so it only...
1
by: SPE - Stani's Python Editor | last post by:
Phatch is a simple to use cross-platform GUI Photo Batch Processor Phatch handles all popular image formats and can duplicate (sub)folder hierarchies. It can batch resize, rotate, apply...
4
by: DGrund | last post by:
I am looking for an example of a program, routine, or code snippet, that will show me exactly how to update a picture's exit metadata. I have been successful in READING this information (using the...
0
by: DGrund | last post by:
I am trying to write a program to access exif metadata. I found a library to do that, but I am having trouble with ONE field: Author. I found an example that shows me how to WRITE that field, but I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.