0

I've tried every Library i could find, and been searching StackOverflow and google for days without getting it working. Libraries: UltraID3Lib, TagLib, IdSharp, ID3 Tag Library by Perry Butler, ID3Lib, C# ID3 Library, ID3.Net, ... ...

None of these seem to be able to get the Cover Art that winamp shows the file has. There is no cover art or jpg or anything of the sort in the folder containing the mp3 either.

Only embedded Cover Art is showing up in every library, but other are not. When opening winamp mp3 "File Info", if the "origin" displays "embedded" it shows up in every library, but if it shows origin "folder" then only winamp seems to know about it. Mind you, there are no images in any folder at all, the mp3 itself does contain this image.

So far i only found 1 other compiled application that gets these images, but i have no way of finding out how they did it. Anyone know what I'm doing wrong? (I am using TagLib atm: https://github.com/mono/taglib-sharp)

    public Song(string filePath)
    {
        var id3 = TagLib.File.Create(filePath);
        TrackNumber = (Winamp.PlaylistPosition + 1);
        Artist = id3.Tag.FirstArtist;
        Title = id3.Tag.Title;
        Position = Winamp.GetTrackPosition();
        Length = Winamp.GetTrackLength();
        AlbumArt = LoadPicture(id3);
        Status = Winamp.GetPlaybackStatus();
    }

private Bitmap LoadPicture(TagLib.File file) 
{ 
    Image currentImage = null; 
    if (file.Tag.Pictures.Length > 0) 
    { 
        TagLib.IPicture pic = file.Tag.Pictures[0]; 
        MemoryStream ms = new MemoryStream(pic.Data.Data); 
        if (ms.Length > 0) 
            currentImage = Image.FromStream(ms); 
            ms.Close(); 
    } 

    return (Bitmap)currentImage;
}
  • Can you post what you have tried to do so far (even if it isn't working). It provide some insight into what you are attempting to do and hopefully allow others to give you some assistance – Takarii Sep 19 '16 at 09:24
  • For some code, right now i'm using TagLib: AlbumArt = LoadPicture(id3); private Bitmap LoadPicture(TagLib.File file) { Image currentImage = null; if (file.Tag.Pictures.Length > 0) { TagLib.IPicture pic = file.Tag.Pictures[0]; MemoryStream ms = new MemoryStream(pic.Data.Data); if (ms.Length > 0) currentImage = Image.FromStream(ms); ms.Close(); } return (Bitmap)currentImage; } No other images to be found anywhere in the dataset – Daemon Bass Sep 19 '16 at 09:27
  • ive done it for you, but if you want to add code to an already asked question, edit your question :) – Takarii Sep 19 '16 at 09:32

0 Answers0