This function can be used to get the data from a "PICTURE" complex property
without having to traverse the whole variant map. A picture can be
retrieved like this:
Note that the data in picture contains pointers to data in properties,
i.e. it only lives as long as the properties, until they are freed with
taglib_complex_property_free().
If you want to access multiple pictures or additional properties of FLAC
pictures ("width", "height", "numColors", "colorDepth" int values), you
have to traverse the properties yourself.
Extract the complex property values of a picture.
This function can be used to get the data from a "PICTURE" complex property without having to traverse the whole variant map. A picture can be retrieved like this:
\code {.c} TagLib_File* file = taglib_file_new("myfile.mp3"); TagLib_Complex_Property_Attribute*** properties = taglib_complex_property_get(file, "PICTURE"); TagLib_Complex_Property_Picture_Data picture; taglib_picture_from_complex_property(properties, &picture); // Do something with picture.mimeType, picture.description, // picture.pictureType, picture.data, picture.size, e.g. extract it. FILE *fh = fopen("mypicture.jpg", "wb"); if(fh) { fwrite(picture.data, picture.size, 1, fh); fclose(fh); } taglib_complex_property_free(properties); \endcode
Note that the data in picture contains pointers to data in properties, i.e. it only lives as long as the properties, until they are freed with taglib_complex_property_free(). If you want to access multiple pictures or additional properties of FLAC pictures ("width", "height", "numColors", "colorDepth" int values), you have to traverse the properties yourself.