View Single Post
  #8  
Old 04-27-2007, 03:09 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 301
Karpagarajan is on a distinguished road
Default Re: Extract Meta Data from images

Hi..Balasubramanian..

I have gone throught that code. I think you can straighaway link the "IPTC.cpp" and "IPTC.h" on to your C# project. these files are used to define the "CIPTC" class. Using the CIPTC class you can extract the IPTC information.
After check with the given sample URL, I have described the following logic to extract the IPTC information.

first insert the following files to your C# project.(download the source file from URL which you posted in previous message)
"IPTC.cpp"
"IPTC.h"
CIPTC m_iptc;


declare the variable like that and use the object in the following manner to assign the IPTC information to your variables.
m_iptc.OpenFile(m_FileName);

m_Byline = m_iptc.m_Byline;
m_BylineTitle = m_iptc.m_BylineTitle;
m_Caption = m_iptc.m_Caption;
m_CaptionWriter = m_iptc.m_CaptionWriter;
m_City = m_iptc.m_City;
m_Country = m_iptc.m_Country;
m_Credits = m_iptc.m_Credits;
m_DateCreated = m_iptc.m_DateCreated;
m_Headline = m_iptc.m_Headline;
m_ObjectName = m_iptc.m_ObjectName;
m_OrigTC = m_iptc.m_OriginalTransmissionReference;
m_Source = m_iptc.m_Source;
m_SpecInstructions = m_iptc.m_SpecialInstructions;
m_State = m_iptc.m_State;
m_Category = m_iptc.m_Category;
m_CopyrightNotice = m_iptc.m_CopyrightNotice;

for(i=0;i<=m_iptc.m_SupplementalCategories.GetUppe rBound();i++)
m_SupCat.AddString(m_iptc.m_SupplementalCategories .GetAt(i));

for(i=0;i<=m_iptc.m_Keywords.GetUpperBound();i++)
m_Keywords.AddString(m_iptc.m_Keywords.GetAt(i));
thanks
__________________
Karpagarajan. R
Necessity is the mother of invention
Reply With Quote