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

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

Some HEIC images on Linux work, some don't

Post by Kef »

Hi, I'm running XnView MP Linux Version 1.4.0 64bits (Dec 12 2022) Libformat version 7.132 on Ubuntu 22.04 with heif-gdk-pixbuf installed.

I have a Samsung Galaxy A22 5G phone with Android 13. All pictures taken with this cell phone after 2022/09/19 can't be opened in XnView. No thumb generated. Can't open. The Ubuntu built in "Image Viewer" app works well with the files that XnView has trouble with.

Perhaps an Android update was pushed out that "broke" the HEIC format? Any help in troubleshooting this is appreciated.
User avatar
xnview
Author of XnView
Posts: 44734
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

could you post a sample file?
Pierre.
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

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

Post by Kef »

xnview wrote: Wed Jan 11, 2023 7:08 am could you post a sample file?
Sure.

https://www.sendspace.com/file/y8b4o9
User avatar
xnview
Author of XnView
Posts: 44734
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

it works with latest version of libheif on windows, which version do you have on linux?
Pierre.
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

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

Post by Kef »

xnview wrote: Sat Jan 14, 2023 7:43 am it works with latest version of libheif on windows, which version do you have on linux?
This is the version I have installed.

libheif1/jammy,now 1.12.0-2build1 amd64 [installed,automatic]
User avatar
xnview
Author of XnView
Posts: 44734
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

in About>Formats, do you see heif?
It seems that there is no libheif.so, so try to make a symbolic link libheif.so->libheif.so.1.12.0?
Pierre.
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

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

Post by Kef »

xnview wrote: Sun Jan 15, 2023 7:33 am in About>Formats, do you see heif?
Looks like no.
Screenshot from 2023-01-15 09-24-57.png
xnview wrote: Sun Jan 15, 2023 7:33 am It seems that there is no libheif.so, so try to make a symbolic link libheif.so->libheif.so.1.12.0?
That does appear to be the case.
I found that Gimp created a sym link for itself.
/snap/gimp/393/usr/lib/libheif.so -> libheif.so.1.12.0

Maybe I installed XnView before I installed the libheif library and that's why there is no link? (I don't recall the order things were installed.)

The library lives here...
/usr/lib/x86_64-linux-gnu/libheif.so.1.12.0

I created a symlink in the lib folder, that didn't change anything.

ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1.12.0 /var/lib/flatpak/app/com.xnview.XnViewMP/x86_64/stable/.../files/XnView/lib/libheif.so

Then I created a symlink in the Plugins folder, still doesn't read heic files.

ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1.12.0 /var/lib/flatpak/app/com.xnview.XnViewMP/x86_64/stable/.../files/XnView/Plugins/libheif.so



p.s. I looked at the EXIF data for the *.heic images that XnView is able to open, and the underlying compression is JPEG, but the extension is *.heic

20220909_084536.heic: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=6, model=SM-A226B, orientation=upper-left, datetime=2022:09:09 08:45:36, GPS-Data, manufacturer=samsung], baseline, precision 8, 8000x6000, components 3
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 44734
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post by xnview »

no create a link like that

Code: Select all

ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1.12.0 /usr/lib/x86_64-linux-gnu/libheif.so
Pierre.
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

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

Post by Kef »

xnview wrote: Sun Jan 15, 2023 3:49 pm no create a link like that

Code: Select all

ln -s /usr/lib/x86_64-linux-gnu/libheif.so.1.12.0 /usr/lib/x86_64-linux-gnu/libheif.so
Tried that. libheif.so.1 and libheif.so point to libheif.so.1.12.0. No change. Still says 190 in About->Formats as before. :?

# ls /usr/lib/x86_64-linux-gnu/libheif*
/usr/lib/x86_64-linux-gnu/libheif.so
/usr/lib/x86_64-linux-gnu/libheif.so.1.12.0
/usr/lib/x86_64-linux-gnu/libheif.so.1

Even tried reinstalling.
# flatpak uninstall com.xnview.XnViewMP
# flatpak install com.xnview.XnViewMP
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 started XnView from the command line to see if it throws something to console, and it does...

LOAD BITMAP </.../.../.../My Pictures/Samsung A22/20220919_131452.heic>
my_error_exit...<Not a JPEG file: starts with 0x00 0x00>
GFF :: LoadThumbnail : 0 0 (2)
ThumbLoaderThread - ADD into DB (790)
BLOB length 75
LOAD BITMAP </.../.../.../My Pictures/Samsung A22/20220919_131447.heic>
my_error_exit...<Not a JPEG file: starts with 0x00 0x00>
GFF :: LoadThumbnail : 0 0 (2)
ThumbLoaderThread - ADD into DB (789)
BLOB length 75
LOAD BITMAP </.../.../.../My Pictures/Samsung A22//20220919_131446.heic>
my_error_exit...<Not a JPEG file: starts with 0x00 0x00>
GFF :: LoadThumbnail : 0 0 (2)
ThumbLoaderThread - ADD into DB (788)

Not sure if this is relevant, or why it expects JPEG.
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

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

Post by Kef »

Well, I uninstalled XnView that was installed by flatpak, and installed it using a DEB file.

HEIF now shows up. So something is up with the flatpak version.

Interestingly, it still shows readable 190 formats.
Screenshot from 2023-01-15 18-06-18.png
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 4157
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

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

Post by cday »

FlatPak downloads are often not the current version, despite being listed with other formats that are the latest version...

That should surely be indicated on the Download page in some way?
Kef
Posts: 11
Joined: Tue Jan 10, 2023 8:24 pm

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

Post by Kef »

cday wrote: Mon Jan 16, 2023 7:35 am FlatPak downloads are often not the current version, despite being listed with other formats that are the latest version...

That should surely be indicated on the Download page in some way?

When I opened XnView that was installed by flatpak it said "XnView MP Linux Version 1.4.0 64bits (Dec 12 2022) Libformat version 7.132".

The XnView that I installed from DEB says "XnView MP Linux Version 1.4.0 64bits (Dec 12 2022) Libformat version 7.132".

Perhaps the flatpak version was compiled with different switches?
cday
XnThusiast
Posts: 4157
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

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

Post by cday »

Kef wrote: Mon Jan 16, 2023 1:45 pm
cday wrote: Mon Jan 16, 2023 7:35 am FlatPak downloads are often not the current version, despite being listed with other formats that are the latest version...

That should surely be indicated on the Download page in some way?
When I opened XnView that was installed by flatpak it said "XnView MP Linux Version 1.4.0 64bits (Dec 12 2022) Libformat version 7.132".
You are lucky as Pierre does not produce Flatpak versions himself, and in the past the download listed has sometimes been quite old.

But surely the Flatpak download should be marked in some way as possibly being an earlier version than the other downloads... :?:

The XnView that I installed from DEB says "XnView MP Linux Version 1.4.0 64bits (Dec 12 2022) Libformat version 7.132".

Perhaps the flatpak version was compiled with different switches?
Pierre?
avmaksimov
Posts: 21
Joined: Sat Feb 11, 2023 2:31 pm

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

Post by avmaksimov »

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.

Is it know bug or may be I need to set up something?