After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616518 - give priority to gvfs preview icons over exiv2
give priority to gvfs preview icons over exiv2
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.11.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2010-04-22 13:43 UTC by Michael Chudobiak
Modified: 2010-04-22 20:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Chudobiak 2010-04-22 13:43:48 UTC
In gnome_desktop_thumbnail_factory_generate_no_script, we have:

  /* Use a registered thumbnail generator */
  pixbuf = gth_hook_invoke_get ("generate-thumbnail", (char *) uri, mime_type, size);

  /* Fall back to gdk-pixbuf */
  if (pixbuf == NULL)
    pixbuf = _gdk_pixbuf_new_from_uri_at_scale (uri, size, size, TRUE);


_gdk_pixbuf_new_from_uri_at_scale checks for gvfs preview::icons, and then reads the whole file. This function should be split into two, so we have:

pixbuf = _gdk_pixbuf_new_from_preview_icon_at_scale
if (pixbuf == NULL) pixbuf = gth_hook_invoke_get
if (pixbuf == NULL) _gdk_pixbuf_new_from_full_file_at_scale

In other words, check for preview::icon first (from the gphoto backend, for example), then use exiv2 to read the embedded thumbnail, and lastly try the whole file.

This is important for the importer - the gphoto gvfs backend provides the fastest access to the thumbnails (much faster than exiv2).

- Mike
Comment 1 Michael Chudobiak 2010-04-22 13:48:02 UTC
Also, I believe the gnome_desktop_thumbnail_factory_generate_thumbnail is unused, and should be removed.

- Mike
Comment 2 Paolo Bacchilega 2010-04-22 20:59:45 UTC
Thanks for the detailed description, this now fixed in master.