TagLibSharp help needed
-
When I try to write to a comment tag field and save the file, I get either expected result, wrong result or an error. Does anyone have suggestions or tips? The intent is to add text to the metadata of jpg images so that I can search images later. Here's the code sofar:
private void buttonOpenFile\_Click(object sender, EventArgs e) { using(OpenFileDialog d = new OpenFileDialog()) { d.InitialDirectory = @"D:\\"; d.Filter = "All jpeg files|\*.jpg;\*.jpeg"; d.ShowDialog(); \_File = TagLib.File.Create(d.FileName,"image/jpeg", TagLib.ReadStyle.None); } textBox1.Text = \_File.Tag.Comment; } private void buttonSaveFile\_Click(object sender, EventArgs e) { \_File.Tag.Comment = textBox1.Text; \_File.Save(); }
-
When I try to write to a comment tag field and save the file, I get either expected result, wrong result or an error. Does anyone have suggestions or tips? The intent is to add text to the metadata of jpg images so that I can search images later. Here's the code sofar:
private void buttonOpenFile\_Click(object sender, EventArgs e) { using(OpenFileDialog d = new OpenFileDialog()) { d.InitialDirectory = @"D:\\"; d.Filter = "All jpeg files|\*.jpg;\*.jpeg"; d.ShowDialog(); \_File = TagLib.File.Create(d.FileName,"image/jpeg", TagLib.ReadStyle.None); } textBox1.Text = \_File.Tag.Comment; } private void buttonSaveFile\_Click(object sender, EventArgs e) { \_File.Tag.Comment = textBox1.Text; \_File.Save(); }
-
When I try to write to a comment tag field and save the file, I get either expected result, wrong result or an error. Does anyone have suggestions or tips? The intent is to add text to the metadata of jpg images so that I can search images later. Here's the code sofar:
private void buttonOpenFile\_Click(object sender, EventArgs e) { using(OpenFileDialog d = new OpenFileDialog()) { d.InitialDirectory = @"D:\\"; d.Filter = "All jpeg files|\*.jpg;\*.jpeg"; d.ShowDialog(); \_File = TagLib.File.Create(d.FileName,"image/jpeg", TagLib.ReadStyle.None); } textBox1.Text = \_File.Tag.Comment; } private void buttonSaveFile\_Click(object sender, EventArgs e) { \_File.Tag.Comment = textBox1.Text; \_File.Save(); }
-
Study the library web site Example https://github.com/mono/taglib-sharp/blob/master/examples/SetPictures.cs[^]
I already studied all i could find...no solution sofar!