Downscale embedded thumbnails within minions

Otherwise the UI would become unresponsive during loading.
This commit is contained in:
2022-06-08 02:45:45 +02:00
parent a8f7532abd
commit 84f8c9436f
3 changed files with 76 additions and 67 deletions

View File

@@ -56,7 +56,9 @@ extern cairo_user_data_key_t fiv_thumbnail_key_lq;
gchar *fiv_thumbnail_get_root(void);
/// Attempts to extract any low-quality thumbnail from fast targets.
cairo_surface_t *fiv_thumbnail_extract(GFile *target, GError **error);
/// If `max_size` is a valid value, the image will be downscaled as appropriate.
cairo_surface_t *fiv_thumbnail_extract(
GFile *target, FivThumbnailSize max_size, GError **error);
/// Generates wide thumbnails of up to the specified size, saves them in cache.
/// Returns the surface used for the maximum size, or an error.