From f71548ce45991fc2698426199116beb8c067d0c2 Mon Sep 17 00:00:00 2001 From: Ivan Oleynikov Date: Tue, 27 Jul 2021 01:52:49 +0600 Subject: Make freeimage backend have preceedence over libjpeg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ☺ --- src/main.c | 8 ++++---- 1 file 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 -- cgit v1.2.3