Re: how to invoke custom thumbnailers?



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.

-- 
Peter Harvey.
Mostly Quiet.





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