IPTC

L

Lionel

Hi,

I need to read the IPTC *keywords* tag from a jpeg file.
I can read all the EXIF tags with this little part of code:

string MyFile = "c:\afile.jpeg"
Image MyImage = Image.FromFile(myFile);
System.Text.ASCIIEncoding Value = new System.Text.ASCIIEncoding();
MessageBox.Show(Value.GetString(MyImage.GetPropertyItem(270).Value));

Here, 270 is one of the EXIF tags.
But how can i read the IPTC tags ? Just the one containing the Keywords
would be fine !

Thanks !
 
A

Ashish Das

You can loop through the PropertyItem collection in image.

Using System.Drawing.Imaging;
......
PropertyItem[] pi = MyImage.PropertyItems;
foreach(PropertyItem i in pi)
{// your code}
 
L

Lionel

Thanks, that's what i'm already doing.
But in this way you can only access the EXIF tags, not the IPTC ones.
I have my jpg files with the keywords tag filled, and i can't get the
keywords from it...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top