I can add custom meta data to mp3 mp4 formats with the taglib library but i cant add custom meta data to jpg, png formats with the taglib library How to add a custom metada to png or jpg file?
Here you've got official examples: https://github.com/mono/taglib-sharp
var tfile = TagLib.File.Create(@"C:\My picture.jpg");
string title = tfile.Tag.Title;
var tag = tfile.Tag as TagLib.Image.CombinedImageTag;
DateTime? snapshot = tag.DateTime;
Console.WriteLine("Title: {0}, snapshot taken on {1}", title, snapshot);
// change title in the file
tfile.Tag.Title = "my new title";
tfile.Save();
Should work just fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.