aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Oleynikov <ivan.oleynikov95@gmail.com>2021-07-27 01:52:49 +0600
committerHarry Jeffery <harry@exec64.co.uk>2021-08-05 21:01:30 +0000
commitf71548ce45991fc2698426199116beb8c067d0c2 (patch)
tree38f71fc6e00a867edc4ba86e9cefb777f3a0d2ce
parentb194997c20fb1ade3aa2828676ca85a2738a8f3e (diff)
downloadimv-f71548ce45991fc2698426199116beb8c067d0c2.tar.gz
Make freeimage backend have preceedence over libjpeg
The current implementation of freeimage backend automatically rotates the images based on EXIF info. Libjpeg backed doesn't do that (although libjpeg itself may be able to, I didn't check). This commit makes Imv use freeimage for jpeg files when both backends are available to enable automatic image rotation when possible. A cleaner solution could be to add automatic rotaiton functionality to libjpeg backend as well, but this quick hack is better than nothing ☺
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 1e11f07..06bd005 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,6 +18,10 @@ int main(int argc, char **argv)
return 1;
}
+#ifdef IMV_BACKEND_FREEIMAGE
+ imv_install_backend(imv, &imv_backend_freeimage);
+#endif
+
#ifdef IMV_BACKEND_LIBTIFF
imv_install_backend(imv, &imv_backend_libtiff);
#endif
@@ -38,10 +42,6 @@ int main(int argc, char **argv)
imv_install_backend(imv, &imv_backend_libnsgif);
#endif
-#ifdef IMV_BACKEND_FREEIMAGE
- imv_install_backend(imv, &imv_backend_freeimage);
-#endif
-
#ifdef IMV_BACKEND_LIBHEIF
imv_install_backend(imv, &imv_backend_libheif);
#endif