Example for recieving cover art

Matthias Göbels matthias at goebels.in
Sun May 9 21:08:52 CEST 2010


Hey there,

i am new to taglib and searching for examples on how to recieve images from the audio-file-tag (mp3 -> Covers). I am getting lost on google.

So maybe you can help me out with examples?

i came up with something like that:

TagLib::MPEG::File theTags(filePath, false);
TagLib::Tag *tag = theTags.tag();
TagLib::String str;
TagLib::ID3v2::Tag *id3v2 = theTags.ID3v2Tag();
	
	if(id3v2)
	{
		static const char *IdPicture = "APIC";
		TagLib::ID3v2::FrameList Frame;
		Frame = id3v2->frameListMap()[IdPicture] ;
		
		if (!Frame.isEmpty())
		{
     // Log that this has a cover or more
		}
	}


but it didn't work out.


Greetings from Matthias.


More information about the taglib-devel mailing list