Cannot open my .heif images in Gwenview

Hi, guys… I’m new here on the forum, but I’ve been using Manjaro since like 7 years ago.

I’m using Manjaro KDE, testing branch, but this is less important as the discovered bug is present in the stable branch, too.

So, I have a Xiaomi 14 phone and my photos are saved in .heif. Now, if I want to open them with Gwenview, I cannot unless, I convert the color profile to GIMP built-in sRGB.

The same images, without color profile conversion, can be opened without any problem in Gwenview, but in TuxedoOS which uses updated KDE packages like Manjaro. Therefore, I believe some package is missing from Manjaro or there is a bug.
I have attached a screenshot with the error. I tried installing some .heif related packages from AUR, but it didn’t work. I don’t know how to sort it out. :face_with_diagonal_mouth:

Welcome to the Forum! :smiley:

Whilst I might not be able to help specifically, it does appear that this is a proprietary format. Have you tried other viewers, though, and do the thumbnail previews show up in Dolphin?

Also, for Terminal output, please copy and paste instead of posting screenshots: highlight the pasted content and click the </> icon at the top of the reply window, to format it for the Forum. Saves us having to use OCR to search the text. :ok_hand:

.heif thumbnails are shown in Dolphin. Proprietary or not, same format works just fine in TuxedoOS with Gwenview. So, there is something missing in Manjaro. :frowning:
.heif thumbnails do not work with Gwenview in Manjaro, but they do work in TuxedoOS.

gwenview
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
kf.i18n.kuit: "Unknown subcue ':whatsthis,' in UI marker in context {@info:whatsthis, %1 the action's text}."
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-aptus-mos"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-arq"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-bay"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-bmq"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-cap"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-cine"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-cs1"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-dc2"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-drf"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-dxo"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-epson-eip"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-epson-erf"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-fff"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-hasselblad-3fr"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-iiq"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-kodak-dcs"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-kodak-kc2"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-mamiya-mef"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-mfw"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-minolta-mdc"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-mng"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-obm"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-ori"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-pfm"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-ptx"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-pxn"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-pxr"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-qtk"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-r3d"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-raw"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-rdc"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-rwl"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-rwz"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-samsung-srw"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-sti"
org.kde.kdegraphics.gwenview.lib: Unresolved raw mime type  "image/x-samsung-srw"
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setOpacity: Painter not active
QPainter::end: Painter not active, aborted
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: QImageReader::read() using format hint "heic" failed: "Unknown error"
org.kde.kdegraphics.gwenview.lib: A bad Qt image decoder moved the buffer to 1194227 in a call to canRead()! Rewinding.
org.kde.kdegraphics.gwenview.lib: Image format is actually "heif" not "heic"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: QImageReader::read() using format hint "heic" failed: "Unknown error"
org.kde.kdegraphics.gwenview.lib: A bad Qt image decoder moved the buffer to 1083944 in a call to canRead()! Rewinding.
org.kde.kdegraphics.gwenview.lib: Image format is actually "heif" not "heic"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: Could not generate thumbnail for file "file:///home/adrian/Pictures/Camera/IMG_20241019_201524.heif"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: Could not generate thumbnail for file "file:///home/adrian/Pictures/Camera/IMG_20241019_201040.heif"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: Could not generate thumbnail for file "file:///home/adrian/Pictures/Camera/IMG_20241019_195232.heif"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: Could not generate thumbnail for file "file:///home/adrian/Pictures/Camera/IMG_20241019_201524.heif"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: Could not generate thumbnail for file "file:///home/adrian/Pictures/Camera/IMG_20241019_201040.heif"
heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error
org.kde.kdegraphics.gwenview.lib: Could not generate thumbnail for file "file:///home/adrian/Pictures/Camera/IMG_20241019_195232.heif"

I notice there are various heif-related libraries in the repositories and AUR. It may be that one of these will help. There are also a few optional dependencies for Gwenview; if you haven’t got these installed it might be worth trying them.

I’ve already installed them. It didn’t work.

How about qt-heif-image-plugin (AUR) …? This fixed it for a user on the Arch BBS.

Pamac search
$ pamac search -a qt-heif-image-plugin
qt-heif-image-plugin-git  0.3.3.r6.g3ab3539-2                                                              AUR
    Qt plugin for HEIF images
qt-heif-image-plugin  0.3.4-1                                                                              AUR
    Qt plugin for HEIF images

Have you installed kimageformats and qt6-imageformats?

2 Likes

qt-heif-image-plugin
kimageformats
qt6-imageformats

These packages are already installed. I did check other forums before arriving here, including the AUR post. :slight_smile: So, you are my last chance. Usually, I can find solution on my own, but, I gave up on this.

1 Like

Could you compare the Gwenview versions on the two OSes? That might give a clue.

Ok, here is one of the .heif images: we.tl/t-bU2Tp0Ud3Z

You may play with it.

TuxedoOS uses same Gwenview version.

Thanks for providing that. Seems I have the same issue, so gives us something to work on. :wink:

Try the live iso of TuxedoOS. It just works! Dunno how. But, I don’t want to use this Ubuntu based distro. :)) I find Manjaro more complete and more up2date distro than other Ubuntu based distros.

XnViewMP available via the AUR can read .heif, .heic but it cannot write/export to those formats. The file that you posted opens fine here in xfce. I have libheif installed.

I just tried with Gwenview, and it won’t open heif images on my system either. Krita will open the file but dumps core when closing it.

The problem is at system level. Let’s say you can open my image with XnViewMP. Can you set my image as wallpaper in Manjaro KDE? I doubt. It works on TuxedoOS.

I can check. I have Manjaro kde and Arch Kde on VM

I found that GIMP has no issue with it even if you decline conversion of the colour profile.
↑ Which suggests that the colour profile is the only issue?

What I’d suggest for now though, is converting the images to something you know works.

Converting the image shows the thumbnail fine (I forgot to say it doesn’t show with the original) and the result opens fine in Gwenview.

The .heif opens fine with XnViewMP on KDE. It will appear in the wallpaper dialogue but it cannot be applied. I agree, something systemic. I agree with @BG405. Why not convert to .jpg or similar and use as wallpaper.

Using imagemagick:

Single File Convert
magick sample1.heif -quality 85 test.jpg

Batch Convert:
magick *.heif -quality 85 test.jpg

Strange that it appears as the first image in the screenshot

1 Like

This doesn’t fix the issue. I sorted it by converting the color profile in GIMP, but it has to work like it works in TuxedoOS which uses the same KDE packages.

Looking at the dependencies for gwenview here
an optional dependency of it is:
the package kimageformats
which, per it’s dependency list, has itself the optional dependency of libheif

Therefore:
installing the optional dependencies libheif as well as kimageformats should do the trick for gwenview. :man_shrugging:

1 Like