Re: how to invoke custom thumbnailers?

Hi Peter,

On Tue, 2004-03-30 at 12:19 +1000, Peter Harvey wrote:

> On Tue, 2004-03-30 at 08:02, Jens Ansorg wrote:
> <snip>
> > Has anybody an idea what might be wrong here? 
> > 
> > Could the mime type be wrong? "file" gives a strange result
> > file -i punat.xcf
> > punat.xcf: application/octet-stream
> > 
> > thanks
> > Jens
> Hi Jens,
> I can't see a problem with what you've done, but I'm convinced that it
> is not directly a mimetype problem. Nautilus seems to determine the
> mimetype in 2.4 using a two stage process (someone please reply if
> this is wrong):
>   1. Analyse the contents, to extract a mimetype.
>   2. If that fails, analyse the filename.
> I can't find an entry for XCF files in /usr/share/misc/file/magic.mime,
> which explains the results of file -i punat.xcf. That Nautilus
> identifies the file as an XCF file is thanks to step 2 above.
> Maybe more interesting is that Nautilus has the inbuilt ability to
> thumbnail XCF, but it hasn't been 'switched on'. Try renaming punat.xcf
> to punat.png or punat.jpg - you will see that it automatically gets a
> thumbnail. Explained step-by-step:
>   1. Nautilus *fails* to identify the file by content.
>   2. Nautilus identifies the file by filename as PNG or JPG.
>   3. Nautilus hands the file to the internal thumbnailer, who happily
>      identifies and thumbnails the image as an *XCF* file.
>   4. Nautilus displays the thumbnail.
> It's because Nautilus can thumbnail most image filetypes automatically
> that I never included gnome-thumbnail-magick in the schemas. Maybe a
> developer needs to just check what filetypes are listed as
> thumbnail-able by the internal routines, and make sure they are used for
> all of them.
> In any case XCF probably needs to be added to
> /usr/share/misc/file/magic.mime, though I don't know who holds the
> responsibility for that.
> Hope that helps.

Thanks for the explanation. Stange thing is that sometimes xfc files do
get thumbnails --- and I could not yed find a pattern when this happens
and when not. Perhaps by creating preview in the Gimp file open dialog?
Anyway, it's not that important. I was just curious, so I tried your
magick thumbnailer ...


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