2014-09-20 5 views
0

ID3 태그 수정을 위해 새 앱에서 일하고 있습니다.MP3 파일로 그림 쓰기 ID3.NET Windows 스토어 앱

제목, 앨범 및 아티스트를 편집 할 수 있지만 사진을 수정할 수 없습니다. 내가 재생중인 I 이미지를 볼 수없는 MP3 파일을 열 때

여기에 내 작은 코드

IList<string> artists = new List<string> { "test artist" }; 
       tag.Title.Value = "my test"; 
       tag.Album.Value = "album test"; 
       tag.Artists.Value.Add("test artist"); 
       tag.Pictures.Add(new Id3.Frames.PictureFrame 
       { 
        PictureData = array, 
        PictureType = Id3.Frames.PictureType.Media, 
        MimeType = "image/jpeg" 
       }); 
       stream.WriteTag(tag, 1, 0, WriteConflictAction.Replace); 
       stream.Dispose(); 

입니다.

도와 주시겠습니까? 고맙습니다.

답변

1
stream.WriteTag(tag, 1, 0, WriteConflictAction.Replace); 

1는 작은 ID3 버전의 주요 및 0을 나타냅니다. 사진/이미지와 같은 미디어 유형은 버전 1에서 구현되지 않으므로 버전 2 이상을 사용해야합니다 (2.3은 ID3 태그 라이브러리에 사용되는 가장 인기있는 버전이고 2.4는 2000 년에 출시 된 최신 버전 임)

stream.WriteTag(tag, 2, 3, WriteConflictAction.Replace); 

으로 해결됩니다. 위의 코드를 적용 할 때 당신은 또한 Idv23Tag을 만들 필요가 있습니다 :

var tag = new Id3v23Tag();

자세한 내용은 http://en.wikipedia.org/wiki/ID3를 참조하십시오.