[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-bugs-dist
Subject:    [Bug 151609] OSD album cover/embedded image bug
From:       Jeff Kerr <jeff.kerr () gmail ! com>
Date:       2007-10-31 20:29:09
Message-ID: 20071031202909.9386.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=151609         




------- Additional Comments From jeff.kerr gmail com  2007-10-31 21:29 -------
Proposed fix (tested, works fine):
On save, test to make sure the extracted image is useable by amarok - if it's not, delete it.

metabundle.cpp
MetaBundle::EmbeddedImage::save
...
   const Q_LONG s = file.writeBlock( m_data.data(), m_data.size() );
   if( s >= 0 && Q_ULONG( s ) == m_data.size() ) {
      debug() << "EmbeddedImage::save " << file.name() << endl;
//NEW LINES START HERE...
      //Verify that the saved embedded image will work in Amarok            
      QImage image( file.name() );
      if(image.isNull()){
         debug() << "EmbeddedImage::save - embedded image saved but unusable - deleting..." << endl;
         file.remove();
         return false;
      }
//NEW LINES END HERE...
      return true;
   }
...
_______________________________________________
Amarok-bugs-dist mailing list
Amarok-bugs-dist@kde.org
https://mail.kde.org/mailman/listinfo/amarok-bugs-dist
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic