string filepath = @"C:\image.jpg"; void EditImage() { try { using (Xmp xmp = Xmp.FromFile(filePath, XmpFileMode.ReadWrite)) { string xmpDump = xmp.Dump(); editdata(xmp); xmpDump = xmp.Dump(); xmp.Save(); } } catch (Exception e) { MessageBox.Show(e.Message); } } string Title = textbox1.Text; string keywords = textbox2.Text; void editdata(Xmp xmp) { DublinCore dc = new DublinCore(xmp); dc.Subject.Clear(); string[] keyword = keywords.Split('-'); foreach (string item in keyword) { dc.Subject.Add(item); } dc.Title.Clear(); dc.Title.DefaultValue = Title; dc.Description.Clear(); dc.Description.DefaultValue = "Some description"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)