From 06dc01983ff5decdfb454b6f27d1ded408be8967 Mon Sep 17 00:00:00 2001 From: nhnielsen Date: Sun, 29 Jul 2007 12:22:50 +0000 Subject: [PATCH] Fix scaling of covers in Meta::Album. QImage::scaled() does not change the original image but returns a scaled copy git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/extragear/multimedia/amarok@693889 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/meta/meta.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meta/meta.cpp b/src/meta/meta.cpp index 3802c677e..32f4ffda5 100644 --- a/src/meta/meta.cpp +++ b/src/meta/meta.cpp @@ -177,8 +177,8 @@ Meta::Album::image( int size, bool withShadow ) const img = QImage( cacheCoverDir.filePath( sizeKey + "nocover.png" ) ); else { - img = QImage( KStandardDirs::locate( "data", "amarok/images/nocover.png" ) ); //optimise this! - img.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation ); + QImage orgImage = QImage( KStandardDirs::locate( "data", "amarok/images/nocover.png" ) ); //optimise this! + img = orgImage.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation ); //scaled does not img.save( cacheCoverDir.filePath( sizeKey + "nocover.png" ), "PNG" ); } -- 2.11.4.GIT