Issues with pre-installed libheif on Ubuntu 24.04.3
I am working on Ubuntu Desktop 24.04.3 (Noble Numbat, LTS), minimal installation with GNOME. I have noticed the following two problems:
(1) Although the heif-thumbnailer library is pre-installed on Ubuntu, no thumbnails for HEIC files are displayed in the Nautilus file manager. While I found the file heif.thumbnailer in the directory /usr/share/thumbnailers (pre-installed) on my system, I could not find the files heif.xml and avif.xml in the directory /usr/share/mime/packages on my system – but apparently they are needed, as described here:
https://github.com/strukturag/libheif?tab=readme-ov-file#heifavif-thumbnails-for-the-gnome-desktop
So I wanted to copy the files heif.xml and avif.xml manually, but couldn't find them at the specified location https://github.com/strukturag/libheif/tree/master/gnome.
So I have two questions:
(a) If the files heif.xml and avif.xml are still needed, where can I find them?
(b) If the files heif.xml and avif.xml are no longer needed, why are no thumbnails for HEIC files displayed in the Nautilus file manager?
(2) Although the heif-gdk-pixbuf library is preinstalled on Ubuntu (as are libheif1 and libde265-0), it is not possible to open HEIC files in the Eye of GNOME image viewer.
Even after updating the gdk-pixbuf loader database with the command sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache, Eye of GNOME was still unable to open HEIC files, even though the loaders.cache file in the directory /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0 had been updated.
https://github.com/strukturag/libheif?tab=readme-ov-file#gdk-pixbuf-loader
So my question is: Are there any further steps necessary to open HEIC files in the Eye of GNOME image viewer?
Those XML files have been removed since the entries are already in shared-mime-info, and Ubuntu 24.04 ships one that is recent enough finally...
Don't know about the rest? You have at least libheif-plugin-aomdec and libheif-plugin-libde265 installed?
Yes, both libraries are pre-installed in Ubuntu 24.04:
apt list | grep libheif-plugin-aomdec
libheif-plugin-aomdec/noble-updates,noble-security,now 1.17.6-1ubuntu4.1 amd64 [Installiert,automatisch]
apt list | grep libheif-plugin-libde265
libheif-plugin-libde265/noble-updates,noble-security,now 1.17.6-1ubuntu4.1 amd64 [Installiert,automatisch]
The HEIC files that cannot be displayed or opened originate from an iPhone 17 with iOS 26.
I think the best thing to do is to first update the outdated libraries on my system with these commands:
sudo add-apt-repository ppa:strukturag/libheif
sudo add-apt-repository ppa:strukturag/libde265
sudo apt update
sudo apt upgrade
Are these the correct commands?
There was an iOS bug that generated broken images. Maybe you have some of those? https://github.com/strukturag/libheif/issues/1448 You can attach one of the images and I'll have a look.
Here is an example file: IMG_0288.HEIC, 2.85 MB. The image displayed correctly on the Dropbox web interface (where I downloaded the file from).
I've tried your image with heif-dec and heif-thumbnailer with v1.19.0, v1.20.0, v1.20.2, and current master and it decodes fine on all those versions. I've not tried the Ubuntu packages, but I see no reason why they should be any different.
Do you get any error with heif-dec IMG_0288.HEIC -o out.jpg ?
What is the output of heif-dec --list-decoders ?
The heif-dec program was not found on my system.
Both heif-dec --version and which heif-dec had no output...
So I first installed the libheif-examples library from the Ubuntu package sources (which was not pre-installed on my system):
sudo apt install libheif-examples
apt list | grep libheif-examples
libheif-examples/noble-updates,noble-security,now 1.17.6-1ubuntu4.1 amd64 [installiert]
ls -la /usr/bin/ | grep heif
-rwxr-xr-x 1 root root 52184 Okt 21 2024 heif-convert
-rwxr-xr-x 1 root root 73176 Okt 21 2024 heif-enc
-rwxr-xr-x 1 root root 43640 Okt 21 2024 heif-info
-rwxr-xr-x 1 root root 26952 Okt 21 2024 heif-thumbnailer
Then I attempted to convert the image:
heif-convert IMG_0288.HEIC IMG_0288.jpg
Could not read HEIF/AVIF file: Invalid input: Unspecified: Too many auxiliary image references
Since I still have version v1.17.6 on my system and you have tested with versions v1.19.0, v1.20.0 and v1.20.2, I have decided to update the version on my system:
sudo add-apt-repository ppa:strukturag/libheif --> This was successful.
sudo add-apt-repository ppa:strukturag/libde265 --> I received an error message... (no Release-File)
OK:1 http://security.ubuntu.com/ubuntu noble-security InRelease
OK:2 http://de.archive.ubuntu.com/ubuntu noble InRelease
OK:3 http://de.archive.ubuntu.com/ubuntu noble-updates InRelease
OK:4 http://de.archive.ubuntu.com/ubuntu noble-backports InRelease
Ign:5 https://ppa.launchpadcontent.net/strukturag/libde265/ubuntu noble InRelease
OK:6 https://ppa.launchpadcontent.net/strukturag/libheif/ubuntu noble InRelease
Fehl:7 https://ppa.launchpadcontent.net/strukturag/libde265/ubuntu noble Release
404 Not Found [IP: 2620:2d:4000:1::81 443]
Paketlisten werden gelesen… Fertig
E: Das Depot »https://ppa.launchpadcontent.net/strukturag/libde265/ubuntu noble Release« enthält keine Release-Datei.
N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert.
N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).
How can I continue from here?
@fancycode Can you take over with the PPA-related things?
Indeed, if these are iPhone HEICs, 1.17.6 is too old and won't work. You might want to check out the savoury1 PPAs as well.
Anyways, this is IMHO beyond the scope of the project, and one should seek support through Ubuntu specific channels.