This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How thumbnails creation works?

Tags: thumbnail, thumbnailer thumbnail, thumbnailer thumbnail, thumbnailer
(comma "," separated)
piotergmoter
Registered Member
Posts
9
Karma
0

How thumbnails creation works?

Wed Nov 02, 2016 9:08 pm
Hi

I wonder how the thumbnails are working in KDE5. I'm on kubuntu LTS 16.04 and have found that thumbnails are stored in ~/.cache/thumbnails, but in the LTS 14.04 there was ~./thumbnail folder. So I guess it changed?

Still I do not get how dolphin and for example gwenview are working when displaying an image? They both create thumbnails in the same way?

what I have also found is that after upgrade from LTS 14 to 16 and moved the thumbnails folder from ~./thumbnail to ~/.cache/thumbnails the gwenview looked like it was still recreating them from scratch. Displaying them was simply slow. Why?

And last. Is it possible to create thumbnails from bash (or whatever) for all of my photos? So I can start this heavy process for night and than have quick browsing using dolphin or gwenview or whatever else.

P.
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: How thumbnails creation works?

Thu Nov 03, 2016 7:28 pm
Earlier:
- viewtopic.php?f=223&t=129633#p346716
- https://www.kubuntuforums.net/showthrea ... -thumbnail


The KDE applications (Dolphin, Gwenview, Plasma, etc...) can show a thumbnail for a file if there is a thumb creator plugin installed for the file type.

The KDE is using freedesktop specifications: http://freedesktop.org/wiki/Specifications/ and there the specification for storing file thumbnails: http://specifications.freedesktop.org/t ... atest.html.

KDE api for the thumbnailers:

KDE4: https://api.kde.org/4.x-api/kdelibs-api ... eator.html
KF5: https://api.kde.org/frameworks/kio/html ... eator.html


what I have also found is that after upgrade from LTS 14 to 16 and moved the thumbnails folder from ~./thumbnail to ~/.cache/thumbnails the gwenview looked like it was still recreating them from scratch. Displaying them was simply slow. Why?


The thumbnails are not always interchangeable. The KDE4 thumbnail name is not always same as the KF5 (KDE Frameworks 5) name.

And last. Is it possible to create thumbnails from bash (or whatever) for all of my photos? So I can start this heavy process for night and than have quick browsing using dolphin or gwenview or whatever else.


Yes - look the Thumbnail Managing Standard.
piotergmoter
Registered Member
Posts
9
Karma
0

Re: How thumbnails creation works?

Thu Nov 03, 2016 9:48 pm
Hi, thanx for the answer.

Rog131 wrote:Earlier:

what I have also found is that after upgrade from LTS 14 to 16 and moved the thumbnails folder from ~./thumbnail to ~/.cache/thumbnails the gwenview looked like it was still recreating them from scratch. Displaying them was simply slow. Why?


The thumbnails are not always interchangeable. The KDE4 thumbnail name is not always same as the KF5 (KDE Frameworks 5) name.


Well, strange because the standard for thumbnail creation is only one. So from this point of view the version of KDE should not matter. And now it looks like I'm wasting o lot of precious SSD disk space occupied by the old KDE4 thumbs.

And last. Is it possible to create thumbnails from bash (or whatever) for all of my photos? So I can start this heavy process for night and than have quick browsing using dolphin or gwenview or whatever else.


Rog131 wrote:Yes - look the Thumbnail Managing Standard.


Hm, do you know some ready to use tools? Creating them is a bit difficult for a person with little programming knowledge.

P.
User avatar
Rog131
Registered Member
Posts
828
Karma
10
...Well, strange because the standard for thumbnail creation is only one. So from this point of view the version of KDE should not matter...


It matters as the KDE4 is handling the URI different way as the KF5. An example:

Making /media/sda2/MD5HashExample/Picture #01.jpg

The KDE4 Dolphin & image thumbcreator plugin are making thumbnail: 33109adc382e52ad71109644cb530541.png
The thumb URI is (exiftool): file:///media/sda2/MD5HashExample/Picture%20%2301.jpg

The KF5 Dolphin & image thumbcreator plugin are making thumbnail: 660f71258a9b1a38352a37ce84d3954d.png
The thumb URI is (exiftool): file:///media/sda2/MD5HashExample/Picture %2301.jpg

ie. the difference is how the KDE4 and the KF5 are escaping the URI. The KDE4 is escaping also the spaces the KF5 doesn't escape those.


Hm, do you know some ready to use tools? Creating them is a bit difficult for a person with little programming knowledge.


The easiest way that I can think is to:
- Turn the thumbnailing on as default from the Dolphin settings.
- Make a script to open Dolphin to the wanted directories. The script keeps the Dolphin window open 10 (?) minutes then kills the Dolphin and opens another Dolphin window...
piotergmoter
Registered Member
Posts
9
Karma
0

Re: How thumbnails creation works?

Fri Nov 04, 2016 9:06 pm
Thank you kindly for explanation.

I think that some python script could be better option than killing dolphins so many times ;-).

P.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], Sogou [Bot], Yahoo [Bot]