attached picture

Martin Obreshkov martin.trashbox at gmail.com
Fri Oct 16 14:40:50 CEST 2009


Yes, i implemented it by myself you can take a look of the code just
modified a few files
Implemented
TagLib::MP4::Item::Item(const ByteVector &value);
ByteVector TagLib::MP4::Item::toByteVector() const;
void TagLib::MP4::Item::parseCover(Atom *atom, TagLib::File *file);

and use it like this

TagLib::MP4::ItemListMap itemsListMap =  mp4Tag->itemListMap();
TagLib::MP4::Item coverItem = itemsListMap["covr"];
char * image = coverItem.toByteVector().data();

the changes are attached if you want to use it

2009/10/16 Lukáš Lalinský <lalinsky at gmail.com>:
> 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
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp4.zip
Type: application/zip
Size: 25963 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20091016/586ff52d/attachment-0001.zip 


More information about the taglib-devel mailing list