aboutsummaryrefslogtreecommitdiff
path: root/fiv-io.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-26 19:41:42 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-27 21:51:01 +0100
commit336053f24d40bc5c350cad285a8d5e146c09d321 (patch)
treec6128561d31f351ffe311ff5dbbe987efd5e0e13 /fiv-io.h
parent2f993502fc6584a5877b300a1353cabf58c4e0e9 (diff)
downloadfiv-336053f24d40bc5c350cad285a8d5e146c09d321.tar.gz
fiv-336053f24d40bc5c350cad285a8d5e146c09d321.tar.xz
fiv-336053f24d40bc5c350cad285a8d5e146c09d321.zip
Implement trivial wide thumbnail production
Also make libwebp a required dependency.
Diffstat (limited to 'fiv-io.h')
-rw-r--r--fiv-io.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fiv-io.h b/fiv-io.h
index 69e3c90..ae39601 100644
--- a/fiv-io.h
+++ b/fiv-io.h
@@ -76,7 +76,7 @@ int fiv_io_filecmp(GFile *f1, GFile *f2);
// --- Export ------------------------------------------------------------------
-/// Requires libwebp.
+/// Saves the page as a lossless WebP still picture or animation.
/// If no exact frame is specified, this potentially creates an animation.
gboolean fiv_io_save(cairo_surface_t *page, cairo_surface_t *frame,
FivIoProfile target, const gchar *path, GError **error);
@@ -131,5 +131,11 @@ typedef struct _FivIoThumbnailSizeInfo {
extern FivIoThumbnailSizeInfo
fiv_io_thumbnail_sizes[FIV_IO_THUMBNAIL_SIZE_COUNT];
+/// Generates wide thumbnails of up to the specified size, saves them in cache.
+gboolean fiv_io_produce_thumbnail(
+ GFile *target, FivIoThumbnailSize size, GError **error);
+
+/// Retrieves a thumbnail of the most appropriate quality and resolution
+/// for the target file.
cairo_surface_t *fiv_io_lookup_thumbnail(
GFile *target, FivIoThumbnailSize size);