Have a look at
http://support.microsoft.com/?kbid=224351 http://www.microsoft.com/technet/tre...er/ScrFF64.asp
I also have this code which I never tried!
private void btnSave_Click(object sender, System.EventArgs e)
{
// Set the temporary property to the first of properties that the JPG already has
System.Drawing.Imaging.PropertyItem propTemp = propAllProperties[0];
byte[] Value = System.Text.ASCIIEncoding.Unicode.GetBytes(txtTitl e.Text);
propTemp.Id = 40091; // Title
propTemp.Len = Value.Length;
propTemp.Value = Value;
imgImage.SetPropertyItem(propTemp);
Value = System.Text.ASCIIEncoding.Unicode.GetBytes(txtComm ents.Text);
propTemp.Id = 40092; // Comments
propTemp.Len = Value.Length;
propTemp.Value = Value;
imgImage.SetPropertyItem(propTemp);
Value = System.Text.ASCIIEncoding.Unicode.GetBytes(txtAuth or.Text);
propTemp.Id = 40093; // Author
propTemp.Len = Value.Length;
propTemp.Value = Value;
imgImage.SetPropertyItem(propTemp);
Value = System.Text.ASCIIEncoding.Unicode.GetBytes(txtKeyw ords.Text);
propTemp.Id = 40094; // Keywords
propTemp.Len = Value.Length;
propTemp.Value = Value;
imgImage.SetPropertyItem(propTemp);
Value = System.Text.ASCIIEncoding.Unicode.GetBytes(txtSubj ect.Text);
propTemp.Id = 40095; // Subject
propTemp.Len = Value.Length;
propTemp.Value = Value;
imgImage.SetPropertyItem(propTemp);
try
{
if(saveFileDialog1.ShowDialog() == DialogResult.OK)
{
imgImage.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}
}
catch(Exception ee)
{
}
}
}
}
--
HTH
Éric Moreau, MCSD
Conseiller Principal / Senior Consultant
Concept S2i inc.(
www.s2i.com)
"Ram [MSFT]" <ra****@online.microsoft.com> wrote in message news:OT**************@TK2MSFTNGP12.phx.gbl...
Hi All,
I'm trying to programatically (using c#) read the file properties (Title, Summary, Author, Comments etc.... The stuff that shows up on the Summary tab when you see the properties of a file).
FileInfo and FileSystemInfo classes expose only the standard properties (create time, mod time etc..).
Any pointers would be greatly appreciated.
Thanks,
Ram Thiru