From 84f8c9436ffb84ca5d443b906f1ffb7be42a50e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 8 Jun 2022 02:45:45 +0200 Subject: Downscale embedded thumbnails within minions Otherwise the UI would become unresponsive during loading. --- fiv-thumbnail.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fiv-thumbnail.h') diff --git a/fiv-thumbnail.h b/fiv-thumbnail.h index 301a641..1a22c75 100644 --- a/fiv-thumbnail.h +++ b/fiv-thumbnail.h @@ -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. -- cgit v1.2.3