문제
요 태그 MP3 파일을 덮개를 가진 예술에서는 C#...
수있는 쉬운 방법이 있을까요?내가 찾 UltraID3Lib 로 exampel 며 그것은 훌륭한 일반 ID3 태그 하지만 손잡이 커버 예술이다.만약 누군가가 알고있는 쉬운 방법을 이렇게 하는 것이 좋:)
해결책
나는 뭔가 이:
private static void FixAlbumArt(FileInfo MyFile)
{
//Find the jpeg file in the directory of the Mp3 File
//We will embed this image into the ID3v2 tag
FileInfo[] fiAlbumArt = MyFile.Directory.GetFiles("*.jpg");
if (fiAlbumArt.Length < 1)
{
Console.WriteLine("No Album Art Found in {0}", MyFile.Directory.Name);
return;
}
string AlbumArtFile = fiAlbumArt[0].FullName;
//Create Mp3 Object
UltraID3 myMp3 = new UltraID3();
myMp3.Read(MyFile.FullName);
ID3FrameCollection myArtworkCollection =
myMp3.ID3v23Tag.Frames.GetFrames(MultipleInstanceFrameTypes.Picture);
if (myArtworkCollection.Count > 0)
{//Get Rid of the Bad Embedded Artwork
#region Remove All Old Artwork
for (int i = 0; i < myArtworkCollection.Count; i++)
{
ID3PictureFrame ra = (ID3PictureFrame)myArtworkCollection[0];
try
{
myMp3.ID3v23Tag.Frames.Remove(FrameTypes.Picture);
}
catch { }
}
myArtworkCollection.Clear();
//Save out our changes so that we are working with the
//most up to date file and tags
myMp3.ID3v23Tag.WriteFlag = true;
myMp3.Write();
myMp3.Read(MyFile.FullName);
#endregion Remove All Old Artwork
}
//Create a PictureFrame object, pointing it at the image on my PC
ID3PictureFrame AlbumArt =
new ID3PictureFrame(
(System.Drawing.Bitmap)System.Drawing.Bitmap.FromFile(AlbumArtFile),
PictureTypes.CoverFront, "Attached picture", TextEncodingTypes.ISO88591);
myMp3.ID3v23Tag.Frames.Add(AlbumArt);
myMp3.ID3v23Tag.WriteFlag = true;
myMp3.Write();
myMp3 = null;
}
난에서 일을 Foldershare 그래서 나를 표시 할 수 없습니다 당신은 내 손을 아래로 버전을 내가 어디에 있는 이미지 개체 하지만 이것은 모든 필요한 작업을 수행하의 비트와 함께 해킹 등이 있습니다.행운을 빕니다.
제휴하지 않습니다 StackOverflow