aboutsummaryrefslogtreecommitdiff
path: root/fiv-io.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-28 18:51:00 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-28 18:54:27 +0100
commit2d86ffed342b3533561102fb204faa500ca356f7 (patch)
tree59d745349ade276d80386cf623952261c707ce08 /fiv-io.h
parentaaa7cb93c3fb2dc9f47a986c03585dfadad80251 (diff)
downloadfiv-2d86ffed342b3533561102fb204faa500ca356f7.tar.gz
fiv-2d86ffed342b3533561102fb204faa500ca356f7.tar.xz
fiv-2d86ffed342b3533561102fb204faa500ca356f7.zip
Save thumbnails lossily, with metadata
Diffstat (limited to 'fiv-io.h')
-rw-r--r--fiv-io.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fiv-io.h b/fiv-io.h
index 97f4fa7..b561286 100644
--- a/fiv-io.h
+++ b/fiv-io.h
@@ -79,6 +79,13 @@ int fiv_io_filecmp(GFile *f1, GFile *f2);
// --- Export ------------------------------------------------------------------
+typedef struct WebPConfig WebPConfig;
+
+/// Encodes a Cairo surface as a WebP bitstream, following the configuration.
+/// The result needs to be freed using WebPFree/WebPDataClear().
+unsigned char *fiv_io_encode_webp(
+ cairo_surface_t *surface, const WebPConfig *config, size_t *len);
+
/// 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,