473,320 Members | 2,006 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,320 software developers and data experts.

IPTC

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.GetPropert yItem(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 !

Nov 16 '05 #1
2 4987
You can loop through the PropertyItem collection in image.

Using System.Drawing.Imaging;
......
PropertyItem[] pi = MyImage.PropertyItems;
foreach(PropertyItem i in pi)
{// your code}
"Lionel" <no****@org.org> wrote in message
news:Of**************@TK2MSFTNGP10.phx.gbl...
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.GetPropert yItem(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 !

Nov 16 '05 #2
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...
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Markus Bulmer | last post by:
Hi, I'm trying to do a photo album with php. The admins should be able to write comments, descriptions etc. into the jpeg files via a web form. I tried to implement this with the (still...
0
by: Jonah Bossewitch | last post by:
Hi, I am using PIL's IptcImagePlugin to extract the IPTC tags from an image file. I was able to successfully retrieve the tags from the image (thanks!), but the results are keyed off of cryptic...
0
by: Wim | last post by:
Hi, Does anybody knows if there are php scripts to extract IPTC info from pictures? Thanks, Wim
0
by: Mads Jacobsen | last post by:
Hi, Can anyone help me with a c# class that can read the IPTC from jpeg files? Regards, Mads
0
by: zeng | last post by:
Is there a way for ASP.net to read and write IPTC info from a JPEG file? Just like what PHP can do? Really appreciate your answer.
1
by: Lionel | last post by:
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 =...
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...
1
by: Jumping Arne | last post by:
I'm completely new to PIL and I'm trying to read IPTC info, I understand that it's possible but I can't find out how (and for once Google doesn't seem to be able to help). Does anyone have an...
1
by: Scott SA | last post by:
On 4/30/08, Jumping Arne (arnlen@mac.com) wrote: Some basic PIL info: <http://www.pythonware.com/library/pil/handbook/index.htm> <http://effbot.org/imagingbook/has a tutorial and more info ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.