Cannot open my .heif images in Gwenview

24.08.1 @TuxedoOS
24.08.1 @Manjaro Stable Branch
24.08.2 @Manjaro Testing Branch

Thanks, that’s interesting. So it doesn’t work with the one in Manjaro Stable either?

It doesn’t! That’s why I switched the branch to testing, believing it will work. It didn’t.

1 Like

There is problem with the IMG_20241019_195232.heif file.

kimg_heif.so Qt plug-in from kimageformats prints following error:

heif_decode_image error: Invalid input: Unknown NCLX matrix coefficients: Unknown error

It means that “matrix coefficients” value is invalid. The value is set to 3, which is not defined in the standard.
Some programs are able to open the file, because they interpret the unknown coefficients the same way like default (nobody knows how to interpret the undefined values, “default” is merely a guess).

However, the kimg_heif.so uses strict decoding which rejects invalid files.

This kind of issue should be reported to the phone’s vendor because they produce files according different understanding of the standards.

As a workaround, it is possible to patch sources of kimageformats to disable the strict decoding (but do it only on your own risk and responsibility).

8 Likes

Welcome to the Community!

Exactly … it’s the phone and its odd-ball formatting shenanigans which is the issue here, not Manjaro.

:ok_hand:

1 Like

I don’t know what you want to prove. :man_shrugging:

TuxedoOS is based upon Ubuntu Jammy.
These are the versions of gwenview with that one:

gwenview : Jammy (22.04) : Ubuntu

4:21.12.03… as you can see

not:

Your screenshot is from KDE Neon - per the version number you underlined.

The simple fact is:
Your picture, the one your phone took,
is the only one any recent software has got problems with.

@novomesk a few posts up explained it best, I think :+1:

it may not even be gwenview itself,
but the libraries that are used by it to process that file format

1 Like

The same images… can be opened without any problem in Gwenview, but in TuxedoOS

same format works just fine in TuxedoOS with Gwenview

Try the live iso of TuxedoOS. It just works!

it has to work like it works in TuxedoOS

it’s better to have an out of the box solution like in TuxedoOS

TuxedoOS will soon change its base to Ubuntu 24, but, now, the KDE environment is updated very frequently, that it even compete you Manjaro

I suggest OP uses TuxedoOS rather than Manjaro KDE

3 Likes

this - or something that works

or:
go through the phones settings
or
see if there is an Andrioid update for that model available

I’d simply switch to .jpeg and be done with all of this - at the cost of a few more bytes of storage, probably, as .heic is supposed to be more … efficient

1 Like

Exactly this, especially as the OP intends to transfer stuff from the phone anyway, so it isn’t the only storage available for the images.

1 Like

Found out something. It appears that if I install the latest package of libheif from AUR, none of the .heif images, including those converted, do not work. But, with the current one, only those .heif from my phone do not work. The bug must be somewhere in this package. Anyway, let’s leave it like this. Maybe, it will get fixed in the future.
image

And, I’m not a TuxedoOS user. Can’t stand the PPAs and some old packages. :stuck_out_tongue:

1 Like

Wikipedia - High Efficiency Image File Format

On some systems, pictures stored in the HEIC format are converted automatically to the older JPEG format when they are sent outside of the system, although incompatibility has led to problems such as US Advanced Placement test takers failing due to their phones uploading unsupported HEIC images by default, leading the College Board to request students change the settings to send only JPEG files.

Although HEIC is gaining in popularity there are issues with compatibility, Adobe Photoshop is an example of a popular image editing software that only supports 8-bit HEIC and not 10-bit or 12-bit HEIC yet.

Camera hardware (including mobile devices) are increasingly supporting outputting HEIC files and with color depth often higher than 8-bit color.

If a user creates a “.HEIF” photo with their phone, the user or the receiver of the photo cannot determine which image format inside the file was used. It could be:

  • a JFIF (JPEG);
  • a poor quality (default settings) AV1; or
  • a very high quality AV1 encoding (which takes a lot of processing power and takes a few minutes to encode); or
  • an HEVC with poor quality parameters; or
  • an HEVC with high quality parameters.

Hence, simply stating in promotional materials that “HEIF is better” doesn’t mean anything at all, as HEIF is just a container specification. What is contained inside the container must be described.

It’s impossible to easily determine exactly what you receive in HEIF container. At best, users can use graphics magic to determine if it’s impossible by visual inspection (gradients transitions are broken in 8-bit photos) to tell if the photo is 12-bit or 10-bit per channel, or 8-bit.

1 Like

… once and as soon as the phone’s vendor starts adhering with their implementation to the standards

Gwenview can't open .heif images - #64 by novomesk

1 Like

Interesting. GIMP gives all three options for what you want to write it out as?

image

One thing I’ll say though: there is no such thing as “nearly lossless”. It is either lossless or it isn’t.

A bit like how some people say “most all”. Which is it? Most, OR All?

1 Like

I mean. … near communicates vicinity.
98 degrees is near 100 degrees but distinctly is not 100 degrees.

Nearly lossless … its close, but is not devoid of loss.

This is seeing it the wrong way around I think.

Most of all of (the) eggs.

Dropping some unnecessary words you get

Most all (the) eggs

So really you might instead see

Most eggs

As the final simplest form, dropping the unecessary all as it can be inferred you are speaking about eggs generally (all) if no distinction is made.

So rather than a dichotomy between most and all you have different points of devolution from ‘most of all of them’.

2 Likes

Indeed, it’s just linguistics. In the example, I say “almost all” meaning not quite all. Semantics? It’s the inference I was referring to. But, in computing, I question the validity of such!

Don’t get me started on “do it already” … :tardis:

Anyway, sorry for going OT.

Which itself would be a sort of contraction of most allalmost. :wink:

1 Like

When you look at it that way, yes I guess so. A bit like the way in English we say things “the other way round” compared to say German and maybe French, others? (I know almost no French, but believe the structure is similar?).

Anglish is so jumbled.
German structure.
Vocabulary from … everywhere …
But probably most visibly influenced into its current iteration by the Norman conquest (so French).

1 Like

For anything related to technology better to use “virtually” instead of “nearly”

e.g. Manjaro updates are virtually flawless

https://www.mi.com/global/product/xiaomi-14/specs

Image formats captured: DNG,HEIF,JPEG

1 Like

I really don’t know why JPEG-XL (.jxl) hasn’t become more accepted. I just converted a 5.2MB JPEG file to a 3.6MB lossless JPEG-XL file - a size reduction of 30%. It may not be as much reduction as a proprietary format such as HEIF/HEIC, or a (slightly) lossy format such as AVIF, but a 30% size reduction for a lossless conversion isn’t something to sneeze at.

Last year I converted the thousands of PNG & JPEG wallpapers I have stored on my mini-PC to lossless JPEG-XL files. Even now, any new wallpapers I download are automatically converted by a script that runs in the background.

1 Like