Cover of flac file

grisha grish.vanika at
Tue Oct 23 22:08:01 UTC 2012

Lukáš Lalinský <lalinsky <at>> writes:

 Well, it's exactly the reverse process.
 You know that the image is in the Vorbis Comment under the name
 "METADATA_BLOCK_PICTURE", so you need to get that field. The field is
 encoded using base64, so you need to decide it to binary data. Once
 you have the binary data, you pass it to the TagLib::FLAC::Picture
 TagLib::Ogg::XiphComment *tag = file.xiphComment();
 if (tag->contains(""METADATA_BLOCK_PICTURE"")) {
   TagLib::String encodedData =
   TagLib::ByteVector data = someBase64DecodeFunction(encodedData);
   TagLib::FLAC::Picture *picture = new TagLib::FLAC::Picture(data);
   // do something with the picture


More information about the taglib-devel mailing list