Re: [gnome-love] Nautilus thumbnails for more formats



Hello Mike,

On Mon, 2003-07-28 at 12:11, mike flyn org wrote:
I am interested in creating external thumbnail creation scripts for all of the 
file formats I use with GNOME.  Many applications (such as the GIMP) create 
thumbnails when saving files.  However, relying on this to happen does not take 
into account files that were created by someone else.  I really like the fact 
that it is easy to add thumbnail creation scripts to nautilus (see gconf's 
desktop/gnome/thumbnailer configuration parameters).

Here is some of my progress so far:

image/x-xcf:

I am trying to use `gimp --no-data --no-interface --batch '(let* (img (car 
(gimp-file-load 1 "%u" "%u")))) (gimp-file-save-thumbnail img "%u"))' 
'(gimp-quit 0)'`.

However, the GIMP does not seem to like to open URLs (vs. simple file paths) so 
this does not work yet.

application/x-dia:

Something like `dia -n -e %o %u`, and use the GIMP to scale the ouput to 
128x128.  Note that dia does not like opening URLs yet either.  However, I think 
this should be easy to convince the author to add since dia is part of the GNOME 
office suite.

application/pdf:

`gs -dNOPAUSE -dBATCH -r128x128 -sDEVICE=png16 -sOutputFile=%o %u` also fails 
because gs does not open URLs.

So there is obviously a trend here.  I have two solutions:

1.  Add support for opening GNOME VFS URLs to all of these applications (I 
expect the GIMP and gs authors may protest "GNOMEifying" their applications).

2.  Allow nautilus to provide thumbnail creation scripts with a file path 
instead of a URL when the URL is of the FILE:// type (ie: %u is URL, %f is file 
path).

There's a third solution. Write a small application that would:
- get passed URLs
- call the appropriate program depending on the mime-type
- handles errors like the external thumbnailers are supposed to.

Something like "gnome-extra-thumbnailer" or something...

I would be interested to hear comments on people who have been down this road 
and any suggestions you may have.  GNOME's thumbnailing support is really cool 
-- its just too bad it only works for such a limited subset of formats. 

By the way, the totem video player distribution provided by Debian's recent 
unstable packages really does thumbnailing right.  It provided me with a lot of 
examples on how to do this type of stuff.

Good to see that it's of use :)

Cheers

-- 
/Bastien Nocera
http://hadess.net

#2  0x4205a2cc in printf ("Oh my %s\n", preferred_deity) from
/lib/i686/libc.so.6 printf ("Oh my %s\n", preferred_deity);
Segmentation fault




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]