I'm having trouble with writing artwork in an MP3 File. I'm able to read and display all the artwork inside the MP3 file, using Taglib-sharp, but when it comes to insert more than 1 Picture (ex:FrontCover and BackCover) in the MP3 tag, i'm having problems with that.If it's just one Artwork... i can do it Can someone please throw me bone, and show me how to do it?? (vb.net would be great but C# also do the trick).
One more request... and deleting the image inside the mp3 tag?? Can someone please give me an example on how to do it also.
Thanks for your help
How are you inserting and removing images? Can you post some code?
All tags work using the IPicture interface and the Tag.Pictures getter and setter. Modifying the contents of the Tag.Pictures array will have no effect on the file so modifying the existing list involves getting the current value, maniplating it, and then setting it back. Simply setting or clearing the picture is easier.
You can set the file to have a single image with:
You can remove all images from a tag with the following:
Manipulation or more complex but follows the same lines of thinking. It would have been better if Tag.Pictures was an IEnumerable instead of an array, but what's done is done.
Here's an example program that sets images from the command line arguments: https://github.com/mono/taglib-sharp/blob/master/examples/SetPictures.cs