Hardcode Exif orientation in thumbnails

This commit is contained in:
2021-12-28 23:10:45 +01:00
parent bf47782f0a
commit 98bdab443a
4 changed files with 99 additions and 73 deletions

View File

@@ -108,6 +108,14 @@ typedef enum _FivIoOrientation {
FivIoOrientation270 = 8
} FivIoOrientation;
/// Returns whether dimensions need to be swapped for rendering.
gboolean fiv_io_orientation_is_sideways(FivIoOrientation orientation);
/// Returns a rendering matrix for a surface. Dimensions need to be pre-swapped.
cairo_matrix_t fiv_io_orientation_matrix(
FivIoOrientation orientation, double width, double height);
/// Extracts the orientation field from Exif, if there's any.
FivIoOrientation fiv_io_exif_orientation(const guint8 *exif, gsize len);
/// Save metadata attached by this module in Exiv2 format.