[KPhotoAlbum] Crash from the latest svn

Robert Krawitz rlk at alum.mit.edu
Wed Aug 18 14:13:25 BST 2010


   From: "Jesper K. Pedersen" <blackie at kde.org>
   Date: Wed, 18 Aug 2010 08:51:57 +0200

   |    | I also vaguely recall that we had a similar performance issue in the
   |    | KDE3 version that was resolved, at least partially, by using a quick
   |    | and dirty resampling algorithm rather than rescaling.  This made the
   |    | thumbnails less attractive but much faster to load.)
   | 
   |    Well actually, that was one of the things I threw out (see my
   |    blog), it took quite some time to do this scaling.
   | 
   | Even a fast resampling (not rescaling)?
   I'm not sure what that code would look like. Feel free to give it a shot.

If I remember right, the thumbnail loader calls the image loader which
calls scaleImage.  That uses a single global setting for smooth
vs. fast scaling (this is actually something I did in 2006).  But
maybe we want a separate setting for thumbnails vs. images (smooth
scale images, fast scale thumbnails).

QImage Utilities::scaleImage(const QImage &image, int w, int h, Qt::AspectRatioM
ode mode )
{
    return image.scaled( w, h, mode, Settings::SettingsData::instance()->smoothS
cale() ? Qt::SmoothTransformation : Qt::FastTransformation );
}





More information about the Kphotoalbum mailing list