Proposed draft for the thumbnail D-Bus specification

Philip Van Hoof spam at
Mon Sep 8 08:10:53 PDT 2008

On Sun, 2008-09-07 at 15:20 +0200, Mikkel Kamstrup Erlandsen wrote:
> 2008/9/7 Philip Van Hoof <spam at>:

> >>  * Which URI schemes are supported? Can I thumbnail web pages? Perhaps
> >> there should be some introspection for this (both in the generic
> >> thumbnailer and the specialized ones).

I'm not going to do this. I tried specifying it and then implementing it
in the prototype: it quickly turned the prototype into a mess.

Not just the code turned into a mess, also the entire concept of wanting
to pass multiple uris in one Queue operation would have to be reviewed:

	If we'd let specialized thumbnailers filter uriSchemes, we would
	have to make double decisions on the grouping of what we pass
	to the specialized thumbnailer's create: grouping by uriScheme,
	and by mimeType.

For example: a generic thumbnailer would have to start doing an enormous
amount of house keeping like the rewriting of groups (into chunks with
the same mimeType and again and also chunks with the same uriScheme).

I would have liked a uriScheme filter per specialized thumbnailer, but I
do think the use-case is too small for the specification to require this

A enormous complex specification would either simply scare implementers
away from making one in the first place, or would leave us with multiple
incorrectly implemented generic thumbnailers.

Which is the same as if we'd specified random data: The specification
renders itself equally irrelevant if nobody gets it right.

A lot of bla bla ... maybe I just failed at specifying this right. Of

If you or somebody else does come up with a nice patch for the prototype
plus a specification that makes uri-scheme filtering possible, I'll
definitely reconsider this decision (after reviewing the complexity of
the patch for the prototype).

> > This is an extremely good question and I am so happy that you raised it!
> > This way and now I know I don't have to explain what I was about to
> > change myself!
> >
> > For example  (if I get your question right) ...
> >
> > What if you want to register a specialized thumbnailer for all your
> > Email attachments, for example? -- people who know me know that I
> > sometimes happen to care about E-mail ;) --
> >
> > That's an URI like this:
> >
> > imap://user@server/INBOX/993/2.2
> >
> > That's (usually) for the second attachment if you have a multipart
> > text/plain plus text/html with two attachments.
> >
> > This URI doesn't give-away the MIME type and more, the MIME type is not
> > what you want to correlate your specialized thumbnailer with in this
> > case. That specialized thumbnailer might want to extract the base64
> > encoded information and pass that information to yet another specialized
> > thumbnailer.
> >
> > I conclude that you want either the URI-scheme OR the MIME type to
> > correlate the specialized thumbnailer with.
> >
> > And that's what your question at its core is about, right?
> >
> > So I will have to rethink the correlation between specialized
> > thumbnailer and generic thumbnailer:
> >
> > - based on a variety of things which means a hard specification and an
> >  even harder implementation
> >
> > - based on MIME type only which doesn't solve this problem
> >
> > - or based on URI scheme and MIME type.. which I currently think is
> >  ideal.
> When playing around with this in my head I quickly realized that there
> are endless possibilities for combining these things, so I would
> advise that you strive to keep this area simple.
> The simplest approach is probably to extend your. Thumbnailer.service
> files with 'uriSchemes' key. My custom webkit-based thumbnailer could
> then be defined as:
> [D-BUS Thumbnailer]
> Name=org.grillbar.Thumbnailer
> comment="thumbnailer for web pages"
> uriSchemes=html;ftp;file
> The missing 'mimeTypes' key should then indicate "hit me, i can take
> it". Ie the default mimeTypes value is '*'. The default value for
> uriSchemes would probably be 'file'.
> Exactly how the thumbnailers should be selected in this two
> dimensional uri/mimetype system I don't know. The core thumbnailer
> will have a hard time guesssing the appropriate thumbnailer for stuff
> like:
> <insert your own variation>
> Maybe it is enough to specify that these keys are merely hints to the
> main thumbnailer... Or maybe these examples goes to show that
> uriSchemes are better left out of the spec.
> Cheers,
> Mikkel
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org

More information about the xdg mailing list