Saturday, 12 July 2014

How to update album art of an mp3 file?

Follow these steps:


  1. Download C# ID3 library from internet or use "http://sourceforge.net/projects/csid3lib/files/csid3lib/"  (Click Download csid3lib-v0.6-src.zip (3.3 MB) ) .
  2. Once you have downloaded the file,extract it and open id3lib.sln and and rebuild the solution.
  3. Now click start button to start debugging.
  4. After that start a new project(C#) and add a window form.
  5. Right click your project solution and click "add reference".
  6. Now click Browse button .
  7. Goto "C:\csid3lib-v0.6-src \id3lib\Mp3Lib\bin\Release" (Here i have extract the zip file in c:\ drive) and select these three files: "Id3Lib.dll", "Mp3Lib.dll", "ICSharpCode.SharpZipLib.dll" 
  8. Now you have added the dll files and can use it.
  9. Now to update album art of an mp3 file use the following code:
Mp3Lib.Mp3File file=new Mp3Lib.Mp3File(@"f:\AASHIQ.mp3");  //give the path of mp3 file
file.TagHandler.Picture=Image.FromFile(@"f:\pic1.jpg");   //give the path of image
file.Update();   

This will change the album art

No comments:

Post a Comment