From bafad1a67ee0071f74b2584d221ef2bc6e90d013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Fri, 26 Nov 2021 00:16:12 +0100 Subject: Add a function to decode TIFF/Exif Orientation --- fastiv-io.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'fastiv-io.h') diff --git a/fastiv-io.h b/fastiv-io.h index 3aed342..a611078 100644 --- a/fastiv-io.h +++ b/fastiv-io.h @@ -46,6 +46,23 @@ cairo_surface_t *fastiv_io_open_from_data( int fastiv_io_filecmp(GFile *f1, GFile *f2); +// --- Metadata ---------------------------------------------------------------- + +// https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf Table 6 +typedef enum _FastivIoOrientation { + FastivIoOrientationUnknown = 0, + FastivIoOrientation0 = 1, + FastivIoOrientationMirror0 = 2, + FastivIoOrientation180 = 3, + FastivIoOrientationMirror180 = 4, + FastivIoOrientationMirror90 = 5, + FastivIoOrientation90 = 6, + FastivIoOrientationMirror270 = 7, + FastivIoOrientation270 = 8 +} FastivIoOrientation; + +FastivIoOrientation fastiv_io_exif_orientation(const guint8 *exif, gsize len); + // --- Thumbnails -------------------------------------------------------------- // And this is how you avoid glib-mkenums. -- cgit v1.2.3