ma4s-org / veloinfo

Apache License 2.0
0 stars 0 forks source link

heic file support #1

Closed martinhamel closed 3 months ago

martinhamel commented 4 months ago

When a user import an animated image on his iphone or some android device, the photo upload is not displayed.

This is due to the image crate not supporting it. https://docs.rs/image/latest/image/index.html

It is solvable by using libheif-rs. But I had some linking problems when I tried.

error: failed to run custom build command for libheif-sys v2.1.1+1.17.4

Caused by: process didn't exit successfully: /app/target/debug/build/libheif-sys-d581d88088fc7a1a/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=LIBHEIF_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=LIBHEIF_STATIC cargo:rerun-if-env-changed=LIBHEIF_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:warning= pkg-config exited with status code 1

PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libheif libheif >= 1.17

The system library libheif required by crate libheif-sys was not found. The file libheif.pc needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory. PKG_CONFIG_PATH contains the following:

martinhamel commented 3 months ago

Le fichier est transformé en jpeg lorsque reçu