Hi!<div><br></div><div><div>Please forget about this problem ("Very long time of parsing of tags").</div><div>After some changes I can not reproduce it.</div><div>Sorry for the trouble.</div><div><br></div><div><br>
</div><div>I have another question about the attached image.</div><div>I found that the file size does not decrease after removal of the picture.</div><div>For example,</div><div> mp3 file without picture have size: 2 078 346 bytes,</div>
<div> size of jpg file to attach: 314 225 bytes,</div><div> size of this mp3 file after attaching the picture: 2 390 164 bytes,</div><div> and size of this mp3 file after deleting of all attached pictures: 2 390 164 bytes.</div>
<div><br></div><div>Why file size does not decrease after removal of the picture?</div><div><br></div><div>For example, I use the next code to delete all pictures from mp3 file:</div><div><br></div><div> TagLib::MPEG::File* pFile = ...;</div>
<div> ...</div><div> TagLib::ID3v2::Tag* pID3v2Tag = pFile->ID3v2Tag();</div><div> if (pID3v2Tag)</div><div> {</div><div> TagLib::ID3v2::FrameList frameList= pID3v2Tag->frameList("APIC");</div>
<div> {</div><div> if (!frameList.isEmpty())</div><div> {</div><div> std::list<TagLib::ID3v2::Frame*>::const_iterator it = frameList.begin();</div><div> while (it != frameList.end())</div>
<div> {</div><div> std::list<TagLib::ID3v2::Frame*>::const_iterator nextIt = it;</div><div> nextIt++;</div><div> pID3v2Tag->removeFrame(*it, true);</div>
<div> it = nextIt;</div><div> }</div><div> }</div><div> }</div><div> }</div><div> ....</div><div> pFile->save();</div><div><br></div>
<div>After performing of this code all pictures are detached, but size of file is not decreased.</div><div>Probably, I did not correctly use the library?</div><div><br></div><br><div class="gmail_quote">2011/3/5 Lukáš Lalinský <span dir="ltr"><<a href="mailto:lalinsky@gmail.com">lalinsky@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Sat, Mar 5, 2011 at 8:53 AM, Vladimir Skuzovatkin <<a href="mailto:skzvlad@gmail.com">skzvlad@gmail.com</a>> wrote:<br>
> Hi!<br>
> I try to write "tag editor" with using "TagLib" library.<br>
> OS: Windows, library version number: TagLib 1.6.3.<br>
> I found next problem.<br>
> The file (mp3, mp4, ...) is opened for a long time (>30 sec) after writing<br>
> to it a image (attached picture, coverArt).<br>
> For example:<br>
> 1) Small (~10Kb) PNG image was written into media file. Time of opening file<br>
> (after writing of image) is equal to ~4 milliseconds.<br>
> 2) Small PNG image was deleted from media file and big (~400Kb) PNG image<br>
> was written into media file. Time of opening file is equal to ~30 seconds.<br>
> Why the time to open (to parse tags) is very big?<br>
> Can you reproduce this error?<br>
<br>
It would be best if you could send me the files to <a href="mailto:lalinsky@gmail.com">lalinsky@gmail.com</a>,<br>
so that I can see the difference on the same files. I'm not aware of<br>
anything that would cause such slowdowns.<br>
<br>
Lukas<br>
_______________________________________________<br>
taglib-devel mailing list<br>
<a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/taglib-devel" target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Thanks,<br>Vladimir<br>
</div>