[prev in list] [next in list] [prev in thread] [next in thread]
List: taglib-devel
Subject: Re: Taglib album image
From: patrick machielse <patrick () hieper ! nl>
Date: 2018-03-04 0:43:47
Message-ID: 188C56C6-7001-4496-AE20-B1AF03650712 () hieper ! nl
[Download RAW message or body]
Op 4 mrt. 2018, om 01:11 heeft Mark P <mark_np@hotmail.it> het volgende geschreven:
> Hi,
>
> Any good Samaritan would be willing to help me on how to extract image album from \
> on specific path using visual studio with c++. With the code in example folder I \
> can get every tag from mp3, m4a, wav and wma but I don't know how to get album art. \
> I only managed to extract it from mp3 using another library (id3lib) and I would \
> need to get it from other audio format. It has been 4-5 days that I'm searching on \
> the net without finding anything about taglib relative to my problem. I found a \
> method in an answer of taglib's developer on stack overflow but it applies only to \
> mp3 and I don't know how to convert it and save it as an image from the struct it \
> returns. I found other methods always on Google but they are not working.
You need to access the appropriate frame or atom in your tag.
Some aproximate code to get you started:
For ID3:
for ( auto it : v2Tag->frameList("APIC") ) {
AttachedPictureFrame *apic = dynamic_cast<AttachedPictureFrame *>(it);
if ( apic ) {
// use apic->picture().data() of apic->picture().size() to create an image in your \
app framework }
}
For mp4:
CoverArtList coverArtList = tag->itemListMap()["covr"].toCoverArtList();
for ( auto it : coverArtList ) {
CoverArt pic = static_cast<CoverArt >(it);
// use pic->data().data() of pic.data().size() to create an image in your app \
framework }
Hope this helps,
patrick
--
Patrick Machielse
Hieper Software
http://www.hieper.nl
info@hieper.nl
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic