Page 1 of 2

Some HEIC images on Linux work, some don't

Posted: Tue Jan 10, 2023 8:36 pm
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.

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

Posted: Wed Jan 11, 2023 7:08 am
by xnview
could you post a sample file?

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

Posted: Wed Jan 11, 2023 1:36 pm
by Kef
xnview wrote: Wed Jan 11, 2023 7:08 am could you post a sample file?
Sure.

https://www.sendspace.com/file/y8b4o9

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

Posted: Sat Jan 14, 2023 7:43 am
by xnview
it works with latest version of libheif on windows, which version do you have on linux?

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

Posted: Sat Jan 14, 2023 2:48 pm
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]

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

Posted: Sun Jan 15, 2023 7:33 am
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?

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

Posted: Sun Jan 15, 2023 3:19 pm
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

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

Posted: Sun Jan 15, 2023 3:49 pm
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

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

Posted: Sun Jan 15, 2023 6:53 pm
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

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

Posted: Sun Jan 15, 2023 9:51 pm
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.

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

Posted: Sun Jan 15, 2023 11:09 pm
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

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

Posted: Mon Jan 16, 2023 7:35 am
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?

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

Posted: Mon Jan 16, 2023 1:45 pm
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?

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

Posted: Mon Jan 16, 2023 2:21 pm
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?

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

Posted: Sat Feb 11, 2023 2:40 pm
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?