Closed Aoi-hosizora closed 4 years ago
I have found that if I directly clear tag.Picture
and mp3.UpdateTag(tag)
, the mp3 file size won't be small.
But if I use mp3.DeleteTag(Id3TagFamily.Version2X)
before UpdateTag
, it won't raise any problem!
public static bool ClearMp3Cover(Mp3 mp3) {
Id3Tag tag = mp3.GetTag(Id3TagFamily.Version2X);
if (tag.Pictures != null) {
tag.Pictures.Clear();
}
mp3.DeleteTag(Id3TagFamily.Version2X);
return mp3.UpdateTag(tag);
}
I use
tag.Pictures.Clear()
andtag.Remove<Id3.Frames.PictureFrame>()
to delete the picture frame of mp3 file, but both of these methods will let the music player(I have tried WMP and MPC-HC) work abnormally, (when I use WMP, it will try to decode the mp3 file and then crash). Here is my code: