When trying to open any avif image file, gimp returns the message: unknown file type. Gimp's compiled with the heif use flag: media-gfx/gimp Installed versions: 2.10.38(0/2)^t(12:44:20 05/10/24)(alsa heif mng udev webp -aalib -aqua -debug -doc -gnome -jpeg2k -jpegxl -openexr -postscript -test -unwind -vector-icons -wmf -xpm CPU_FLAGS_PPC="-altivec" CPU_FLAGS_X86="mmx sse") and media-libs/libheif Installed versions: 1.18.1(0/1.18)^t(17:25:21 05/10/24)(aom gdk-pixbuf rav1e svt-av1 threads x265 -go -test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32") At the same time imagemagick with the heif use flag properly decodes the same avif files (for example with magick display file.avif) Any clue how to get gimp to decode avif?
Sorry for long delay. I checked it and could confirm that Gimp-2.10.38 being built against media-libs/libheif-1.18.1 can't open(export) and save(import) heif and avif images. While successfully does it being build against media-libs/libheif-1.15.2-r1(0/1.12) and configuration with it also states: Optional Plug-Ins: ... HEIC: import: yes - export: yes [profile support: yes] AVIF: import: yes - export: yes ... and with libheif-1.18.1(0/1.18) the configuration is: Optional Plug-Ins: ... HEIC: import: - export: [profile support: no] AVIF: import: - export: ... (addition of USE="x265" or USE="svt-av1" have no affect). So the quickest workaround is use media-libs/libheif-1.15.2-r1. Also the gimp-2.99.18-r1 seems has no problem with libheif-1.18.1:
Thanks for that. I'll probably wait for gimp 99 to become stable or heif to upgrade to a compatible version (gimp's ebuild suggest >=media-libs/libheif-1.9.1) Because one of my packages (may be imagemagick) does require heif >= 1.18.1
I was out of my gentoo pc last week so I need to check what was the difference between libheif-1.15.2 and 1.18.1: the gimp-2.10.38 founds both of them in the system but for newest one doesn't add support for heif/avif export/import.
Thanks. That's indeed strange that a package named heif no longer supports the heif format.
The libheif dropped autotools support since 1.8.0 version with removing additional variables from libhief.pc file that were used by gimp confugure.ac confuguration to check if export/import is supported. I could try to make unconditionaly set heif export/import for gimp-2.10.38 if libheif is presented. I built gimp-2.10.38 against libheif-1.15 2 and then just update to 1.18.1 without gimp rebuild and heif/avif files are opened. So there is only configuration problem.
This should work yes. You could also have a look at how gimp 2.99.18-r1 does it and borrow their approach if feasible.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4b9f72802b4d4be021e6fa77198c5d3d0d1a4d1 commit b4b9f72802b4d4be021e6fa77198c5d3d0d1a4d1 Author: Sergey Torokhov <torokhov-s-a@yandex.ru> AuthorDate: 2024-10-17 14:08:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-10-18 12:25:00 +0000 media-gfx/gimp: gimp-2.10.x, fix media-libs/libheif-1.18 compat Closes: https://bugs.gentoo.org/940915 Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru> Closes: https://github.com/gentoo/gentoo/pull/39017 Signed-off-by: Sam James <sam@gentoo.org> ...mp-2.10_libheif-1.18_unconditional_compat.patch | 23 ++++++++++++++++++++++ ...mp-2.10.34-r2.ebuild => gimp-2.10.34-r3.ebuild} | 6 +++++- ...{gimp-2.10.36.ebuild => gimp-2.10.36-r3.ebuild} | 6 +++++- ...mp-2.10.36-r2.ebuild => gimp-2.10.36-r4.ebuild} | 6 +++++- ...{gimp-2.10.38.ebuild => gimp-2.10.38-r1.ebuild} | 4 ++++ 5 files changed, 42 insertions(+), 3 deletions(-)
Excellent; working perfectly. Thanks