[Thunar-dev] A Standard for Thumbnailers

Erlend Davidson E.R.M.Davidson at sms.ed.ac.uk
Sat Jan 13 12:43:20 CET 2007


Benedikt Meurer wrote:
> Erlend Davidson wrote:
>   
>>>> However, thunar-vfs-pixbuf-thumbnailer-1 is optimised for this purpose 
>>>> (uses the jpg resizing trick mentioned on the xdg mailing list) and 
>>>> takes just 0.1 seconds to convert the jpeg to a png - but I can't pipe 
>>>> the output from dcraw into it.  For this reason would it be possible to 
>>>> add an option to thunar-vfs-pixbuf-thumbnailer-1 which enables it to 
>>>> take the input image from stdin?
>>>>     
>>>>         
>>> The thunar-vfs-pixbuf-thumbnailer doesn't use any special tricks, it
>>> just a wrapper for GdkPixbuf routines. Check the source it's really simple.
>>>       
>> I see that now.  So GdkPixbuf is faster than convert?  Is it using that 
>> DCT technique for resizing?
>>     
>
> Checking my own source again... you should be able to store the
> thumbnail as JPEG. thunar_vfs_thumb_factory_generate_thumbnail() will
> also accept JPEGs and convert them to PNGs internally.
Ok, I've tested this - it doesn't work.  Thinking about it this makes sense:
thunar invokes the raw-thumbnailer, saying "produce a thumbnail of ifile 
called ofile".  ofile is a png image, or at least an image with a png 
extension.  But if the thumbnailer gives a .png file in which the format 
is actually jpg/ppm then pixbuf will get confused.  Also, the 
raw-thumbnailer script won't get the chance to resize the image - so 
it'll be on the order 3000x2000 pixels!



More information about the Thunar-dev mailing list