Re: RFC: preview files



On Wed, 2008-10-15 at 22:04 -0400, David Zeuthen wrote:
> Hey,
> 
> So one interesting feature of digital cameras is that they're capable of
> generating thumbnails on the device side. This is actually pretty useful
> when importing photos; instead of downloading hundreds images (each
> 5-10MB on my Canon EOS 5D DSLR) for the import dialog, one can download
> the previews (typically ~10KB of size 160x120).

I think this is a nice feature. However, I think its somewhat ugly to
expose the preview as a separate file in the namespace. For instance if
you do a recursive copy of the directory with the files in it you'll get
a copy of the thumbnail files. 

In my initial design of GIO/GVFS I thought about a similar but not
identical case: custom icons. Take a http location with a favicon set
for instance. You want to specify that the location has an icon, and you
want to allow the file manager to do the I/O required to get the bits
required to render the icon. In some backends the icon is not
expressible as a uri, and the plan in this case would be to return a
custom GIcon object implementing GLoadableIcon, that internally contains
some sort of gvfs-backend-side-specific id. If you then call
g_loadable_icon_load() we'll open a direct stream to the icon bits.

This could be used for previews too, thus avoiding pollution of the
filesystem with virtual files.

Btw. Your uri generation code is wrong, you need to escape the directory
names, etc.



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