aboutsummaryrefslogtreecommitdiff
path: root/fiv-thumbnail.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-06-08 02:45:45 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-06-08 02:51:55 +0200
commit84f8c9436ffb84ca5d443b906f1ffb7be42a50e2 (patch)
tree5b9a614080f5b74806e7d37e7292982f9f401406 /fiv-thumbnail.h
parenta8f7532abdd9eade6ccc7587968e63eea3b5d159 (diff)
downloadfiv-84f8c9436ffb84ca5d443b906f1ffb7be42a50e2.tar.gz
fiv-84f8c9436ffb84ca5d443b906f1ffb7be42a50e2.tar.xz
fiv-84f8c9436ffb84ca5d443b906f1ffb7be42a50e2.zip
Downscale embedded thumbnails within minions
Otherwise the UI would become unresponsive during loading.
Diffstat (limited to 'fiv-thumbnail.h')
-rw-r--r--fiv-thumbnail.h4
1 files changed, 3 insertions, 1 deletions
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.