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 ☺
This commit is contained in:
Ivan Oleynikov 2021-07-27 01:52:49 +06:00 committed by Harry Jeffery
parent b194997c20
commit f71548ce45

View file

@ -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