attached picture
Lukáš Lalinský
lalinsky at gmail.com
Fri Oct 16 12:05:32 CEST 2009
On Fri, Oct 16, 2009 at 9:25 AM, Martin Obreshkov
<martin.trashbox at gmail.com> wrote:
> Hi i've just started with taglib a few days ago and for now it works
> fine. I am working on a function to extract artowrks from a file if
> the file is MPEG with ID3v2 tag TagLib::ID3v2::AttachedPictureFrame
> do the job but how can i do that for MP4 fie formats. I have try doing
> it by using TagLib::MP4::Tag::itemListMap but there is no item for
> picture frame so any suggestions how to do it? :)
I'm afraid you can't do that in TagLib 1.6. I didn't realize I forgot
to add explicit support for covr atoms. :( The MP4 atoms that hold
cover art are identical to standard text atoms, but they use a special
"flag" to determine whether the image is PNG or JPEG. The current
implementation will clear the flag even on existing covr atoms if you
save them, so the missing feature is also a bug. I'll fix this today,
and do a 1.6.1 release this sunday.
Something like this will work then:
file->tag()->itemListMap()["covr"] = TagLib::MP4::Item(imageData,
TagLib::MP4::Item::FormatPNG);
--
Lukas Lalinsky
lalinsky at gmail.com
More information about the taglib-devel
mailing list