aboutsummaryrefslogtreecommitdiff
path: root/fastiv-io.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-14 05:03:55 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-15 02:45:20 +0100
commit4f035bc6b1aa81b4be90df83e02235bde5c0ad5c (patch)
tree053ed4a577603acd2d0995a7b0b62071529d63d8 /fastiv-io.h
parent18f7607e1bb397f67c318b964fc8060072fc2cdb (diff)
downloadfiv-4f035bc6b1aa81b4be90df83e02235bde5c0ad5c.tar.gz
fiv-4f035bc6b1aa81b4be90df83e02235bde5c0ad5c.tar.xz
fiv-4f035bc6b1aa81b4be90df83e02235bde5c0ad5c.zip
Allow saving the current frame/page in WebP
Also support saving just the metadata.
Diffstat (limited to 'fastiv-io.h')
-rw-r--r--fastiv-io.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/fastiv-io.h b/fastiv-io.h
index c8a256b..a581ea8 100644
--- a/fastiv-io.h
+++ b/fastiv-io.h
@@ -1,5 +1,5 @@
//
-// fastiv-io.h: image loaders
+// fastiv-io.h: image operations
//
// Copyright (c) 2021, Přemysl Eric Janouch <p@janouch.name>
//
@@ -59,6 +59,13 @@ cairo_surface_t *fastiv_io_open_from_data(
int fastiv_io_filecmp(GFile *f1, GFile *f2);
+// --- Export ------------------------------------------------------------------
+
+/// Requires libwebp.
+/// If no exact frame is specified, this potentially creates an animation.
+gboolean fastiv_io_save(cairo_surface_t *page, cairo_surface_t *frame,
+ const gchar *path, GError **error);
+
// --- Metadata ----------------------------------------------------------------
// https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf Table 6
@@ -76,6 +83,10 @@ typedef enum _FastivIoOrientation {
FastivIoOrientation fastiv_io_exif_orientation(const guint8 *exif, gsize len);
+/// Save metadata attached by this module in Exiv2 format.
+gboolean fastiv_io_save_metadata(
+ cairo_surface_t *page, const gchar *path, GError **error);
+
// --- Thumbnails --------------------------------------------------------------
// And this is how you avoid glib-mkenums.