FLAC::File::removePictures not work
quadamage at gmail.com
Mon Sep 6 08:29:17 CEST 2010
Thanks for your prompt reply, however I still have some troubles in removing
mp4 cover art;
I programmatically added 70 1600X1200 jpg files to a small mp4 clip, the
file size increased from 0.09 to 35 MB after saving.
I tried to remove the covers like this:
MP4::File f(strName, false );
MP4::Tag *mp4Tag = f.tag();
if ( mp4Tag && !mp4Tag->isEmpty() )
MP4::ItemListMap map = mp4Tag->itemListMap();
MP4::ItemListMap::Iterator it = map.begin();
for ( ; it != map.end(); ++it )
mp4Tag->RemoveItme( (*it).first );
if ( !f.save() )
printf( ("Fail to save") );
The code did remove the mpeg4 tag as well as the covers, but the file size
is still 35MB. I think the covers have been invalidated but their binary
data were still stored in the file.
I am not sure it was the fault of the above code or it was caused by a bug
2010/9/6 Lukáš Lalinský <lalinsky at gmail.com>
> On Sun, Sep 5, 2010 at 6:25 PM, Anthony Liu <quadamage at gmail.com> wrote:
> > Hi to all, I tried to remove pictures of a flac file like this:
> > FLAC::File f( "I:\\test.flac", true );
> > f.removePictures();
> > if ( !f.save() ) printf( "Fail to save!") );
> > The save function seemed to be called successfully, but the pictures were
> > still existing.
> > Any suggestions regarding this?
> Embedding images in FLAC pictures is not supported in any released
> version of TagLib. The code which is currently in SVN is limited to
> read-only operations. It will work in versoin 1.7, but currently
> neither adding nor removing pictures is implemented.
> taglib-devel mailing list
> taglib-devel at kde.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the taglib-devel