Some HEIC images on Linux work, some don't

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

avmaksimov wrote: Sat Feb 11, 2023 2:40 pm Hello to all! I've just installed XNView MP 1.4.2 on my Ubuntu 22.10 via deb packet. And it can't open HEIC file.
Do you have the package libheif1 installed?
avmaksimov
Posts: 21
Joined: Sat Feb 11, 2023 2:31 pm

Re: Some HEIC images on Linux work, some don't

Post by avmaksimov »

winnylinny wrote: Sat Feb 11, 2023 6:59 pm
avmaksimov wrote: Sat Feb 11, 2023 2:40 pm Hello to all! I've just installed XNView MP 1.4.2 on my Ubuntu 22.10 via deb packet. And it can't open HEIC file.
Do you have the package libheif1 installed?
Thank you for your answer. Yes: ver. 1.13.0-1.
User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

Is it for all HEIC/HEIF files, or only specific ones?

Do you see HEIF under Help > About > Formats?
avmaksimov
Posts: 21
Joined: Sat Feb 11, 2023 2:31 pm

Re: Some HEIC images on Linux work, some don't

Post by avmaksimov »

winnylinny wrote: Sat Feb 11, 2023 7:51 pm Is it for all HEIC/HEIF files, or only specific ones?

Do you see HEIF under Help > About > Formats?
I think for all. No, I don't see HEIF.
Image
User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

What is the output for:

Code: Select all

ls -l /usr/lib/ | grep heif
avmaksimov
Posts: 21
Joined: Sat Feb 11, 2023 2:31 pm

Re: Some HEIC images on Linux work, some don't

Post by avmaksimov »

winnylinny wrote: Sun Feb 12, 2023 3:58 am What is the output for:

Code: Select all

ls -l /usr/lib/ | grep heif
nothing (
User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

Try these two commands, and then re-launch XnViewMP:

Code: Select all

sudo ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1 /usr/lib/libheif.so.1
sudo ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1 /usr/lib/libheif.so
You're using the .deb package for XnViewMP, correct? Not the AppImage or Flatpak?
avmaksimov
Posts: 21
Joined: Sat Feb 11, 2023 2:31 pm

Re: Some HEIC images on Linux work, some don't

Post by avmaksimov »

winnylinny wrote: Sun Feb 12, 2023 1:21 pm Try these two commands, and then re-launch XnViewMP:

Code: Select all

sudo ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1 /usr/lib/libheif.so.1
sudo ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1 /usr/lib/libheif.so
You're using the .deb package for XnViewMP, correct? Not the AppImage or Flatpak?
Thank you! After this command all works fine! I installed deb package of course.
User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

avmaksimov wrote: Sun Feb 12, 2023 2:11 pm Thank you! After this command all works fine! I installed deb package of course.
Glad it works!

Unfortunately, this is an issue of some distros (such as Ubuntu) offering "multiarch" libraries. They do not use the standard /usr/lib/ directory, but rather split them into /usr/lib/x86_64-linux-gnu/ and /usr/lib/i386-linux-gnu/ directories.

Applications that use system libraries expect the library files to be located under /usr/lib/

The symlinks you created should keep working, even throughout updates to your Ubuntu system. :)

In my opinion, distros need to move away from offering 32-bit anything, anymore. (Except maybe gaming-related libraries.)

We live in a pure 64-bit OS world at this point.
avmaksimov
Posts: 21
Joined: Sat Feb 11, 2023 2:31 pm

Re: Some HEIC images on Linux work, some don't

Post by avmaksimov »

winnylinny wrote: Sun Feb 12, 2023 3:13 pm
avmaksimov wrote: Sun Feb 12, 2023 2:11 pm Thank you! After this command all works fine! I installed deb package of course.
Glad it works!

Unfortunately, this is an issue of some distros (such as Ubuntu) offering "multiarch" libraries. They do not use the standard /usr/lib/ directory, but rather split them into /usr/lib/x86_64-linux-gnu/ and /usr/lib/i386-linux-gnu/ directories.

Applications that use system libraries expect the library files to be located under /usr/lib/

The symlinks you created should keep working, even throughout updates to your Ubuntu system. :)

In my opinion, distros need to move away from offering 32-bit anything, anymore. (Except maybe gaming-related libraries.)

We live in a pure 64-bit OS world at this point.
Unfortenetuly there are many computer with 32-bit yet. But may be better the app search for this lib not only in /usr/lib/ but also in /usr/lib/x86_64-linux-gnu/ ? I think is simplier then expecting some changes from Ubuntu).
And BTW Ubuntu is one of the popular distros in the world. So I think it's more rightful to keep in my mind about library path.
User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

avmaksimov wrote: Sun Feb 12, 2023 3:45 pmBut may be better the app search for this lib not only in /usr/lib/ but also in /usr/lib/x86_64-linux-gnu/ ?

I created a feature request! :mrgreen:

viewtopic.php?f=60&t=44798

8)
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

Re: Some HEIC images on Linux work, some don't

Post by Kef »

I'm having an issue with some HEIC files. I'm attaching one sample file.

This file can't be viewed in XnView. It shows up in the browser and has a thumbnail but can't be opened. It also does not show the 'date taken' timestamp in the browser, and can't be sorted by 'date taken'. But XnView sees the 'date taken' just fine and shows it in the 'Properties' section.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 44883
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Some HEIC images on Linux work, some don't

Post by xnview »

Kef wrote: Mon Jul 24, 2023 7:13 pm I'm having an issue with some HEIC files. I'm attaching one sample file.

This file can't be viewed in XnView. It shows up in the browser and has a thumbnail but can't be opened. It also does not show the 'date taken' timestamp in the browser, and can't be sorted by 'date taken'. But XnView sees the 'date taken' just fine and shows it in the 'Properties' section.
No problem to view this file on linux, do you have tried 'update catalog from file'?
Pierre.
User avatar
winnylinny
Posts: 167
Joined: Fri Apr 17, 2020 5:35 pm

Re: Some HEIC images on Linux work, some don't

Post by winnylinny »

Works fine for me too.

Did you try the above workarounds? (In reference to the "library" paths.)
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

Re: Some HEIC images on Linux work, some don't

Post by Kef »

winnylinny wrote: Tue Jul 25, 2023 6:43 am Did you try the above workarounds? (In reference to the "library" paths.)
The paths are good since half of my HEIC images work just fine in all ways.
xnview wrote: Tue Jul 25, 2023 6:39 am No problem to view this file on linux, do you have tried 'update catalog from file'?
That's the first thing I did to try to fix it before posting here. It didn't help.

But after your comment I moved a HEIC file somewhere else on my file system and went to look at it with XnView, and everything looked fine with it.

So I went into Settings and deleted the catalog for that directory. After that it started working. 👍