Bug 193579 - no previews in filemanagers and folderview widget for icons below 64x64
Summary: no previews in filemanagers and folderview widget for icons below 64x64
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-22 00:24 UTC by Janet
Modified: 2009-09-18 16:18 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janet 2009-05-22 00:24:36 UTC
Version:            (using KDE 4.2.85)
OS:                Linux
Installed from:    Ubuntu Packages

Since I upgraded from KDE 4.2.3 to KDE 4.3 Beta there are no previews for icons smaller than 64x64 anymore. Although picture preview is selected only previews are generated for the larger icons. The previews for the smaller pictures are shown in the tooltips and the dolphin sidebar and on the folders but not in the filemanager/folderview widget directly.
Comment 1 FiNeX 2009-05-23 14:55:58 UTC
confirmed in trunk too.
Comment 2 Dario Andres 2009-06-16 00:30:48 UTC
Here using:

Qt: 4.5.1 (qt-copy  971295)
KDE: 4.2.91 (KDE 4.2.91 (KDE 4.3 >= 20090609))
kdelibs svn rev. 982117 / kdebase svn rev. 982118
on ArchLinux i686 - Kernel 2.6.29.4

I can't reproduce this.
Can anyone else confirm this?
Thanks
Comment 3 FiNeX 2009-06-16 01:11:06 UTC
I can reproduce with:
kde svn r982192
qt 4.5.1-3

Just create a 5x5 pixels image and enable preview in dolphin.
Comment 4 Dario Andres 2009-06-16 01:17:29 UTC
Oops.. I misunderstood something..
Comment 5 Dario Andres 2009-06-16 02:02:41 UTC
Indeed, this is still valid:

From "KFilePreviewGenerator" code:

Function "void KFilePreviewGenerator::Private::addToPreviewQueue(const KFileItem& item, const QPixmap& pixmap)" 
called when the preview was already generated for that item:

"
    const QSize size = m_viewAdapter->iconSize();
    if ((pixmap.width() < size.width()) && (pixmap.height() < size.height())) {
        // If the width and the height are smaller than the available size, an old
        // preview has been received, where the available size was smaller. Note that
        // no check for a larger icon size is done, as a downscaling will be done
        // anyhow.
        return;
    }
"

I checked and this cases are hitting this.

---

Weird enough:

I had a 45x2 jpg image in a folder. 
With a >32 preview size, (at first), no preview was shown
Then, changing to 32px will show the preview.
From now on, increasing the preview size will still show the preview
But values <32 won't show it.

Pretty weird

--

I wonder if this could be cause by some code change on KIO::PreviewJob or in the thumbnail:/ preview creators

--

@Peter: your name is on the KFilePreviewGenerator code :)
Comment 6 Dario Andres 2009-06-16 02:07:34 UTC
BTW: that code was introduced at: http://websvn.kde.org/?view=rev&revision=947588
Comment 7 Janet 2009-09-18 15:02:55 UTC
Solved I guess? At least I cannot reproduce the problem anymore.
Comment 8 Peter Penz 2009-09-18 16:18:42 UTC
Thanks Janet - yes, this bug has been fixed in the meantime :-)