From kfm-devel Thu Mar 28 15:05:48 2002 From: Malte Starostik Date: Thu, 28 Mar 2002 15:05:48 +0000 To: kfm-devel Subject: Re: Accessing Konqueror thumbnails. How? X-MARC-Message: https://marc.info/?l=kfm-devel&m=101732994904708 Am Tuesday 26 March 2002 20:25 schrieb Robert Vogl: > Hi kfm-devel fans, > > In its "preview-mode" Konqueror apparently stores the thumbnails of > the listed images somehow and somewhere in a /tmp-directory. > > My question is: > > How could a KIO-slave (SlaveBase) access to these thumbnails? It > shall check if a thumbnail for a certain image given by its URL, does > already exist or not. > > The question is relevant for KDE2.2.x. If you only want to see if it already exists, just calculate an MD5 hash of the file's URL and see if the result exists (see kdebase/libkonq/konq_previewjob.cpp for the algorithm used - or kdelibs/kio/kio/previewjob.cpp in KDE 3). If you also want to create a thumbnail if it's not there yet, get KDE 3 and use KIO::filePreview() :-) Please note that the cache location will change once Qt 3.1 will be available, it will then conform to http://triq.net/~pearl/thumb-spec.php -- Malte Starostik PGP: 1024D/D2F3C787 [C138 2121 FAF3 410A 1C2A 27CD 5431 7745 D2F3 C787]