Bug 442510 - I can't see avif images, kimageformat-plugins package updated to 5.86 with support for avif file
Summary: I can't see avif images, kimageformat-plugins package updated to 5.86 with su...
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-16 10:14 UTC by BugCoder
Modified: 2023-04-04 11:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
qt-avif-image-plugin.xml (732 bytes, text/plain)
2021-09-21 13:12 UTC, dnovomesky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BugCoder 2021-09-16 10:14:58 UTC
SUMMARY

I can't see avif images, framework package kimageformat-plugins has been updated to 5.86 with support for avif file in KDE Neon

STEPS TO REPRODUCE
1. upgrade KDE Neon to last version
2. try to open a avif Image
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 BugCoder 2021-09-17 07:29:33 UTC
if Gwenview uses kimageformat-plugins to open images, now it has to open avif images because it has the plugin for it. no??
Comment 2 BugCoder 2021-09-17 07:31:07 UTC
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.3
Comment 3 dnovomesky 2021-09-20 21:11:48 UTC
kimageformats can be built with or without AVIF support. For example when libavif is missing then kimg_avif.so is not built.

Check if you have kimg_avif.so in /usr/lib/qt5/plugins/imageformats (or /usr/lib/qt/plugins/imageformats/ or /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats)

Tell me If you have the kimg_avif.so and then I will know more.
Comment 4 BugCoder 2021-09-21 10:51:01 UTC
the kimageformat-plugins V5.86 package now install this file 

/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/kimg_avif.so
Comment 5 dnovomesky 2021-09-21 12:07:01 UTC
> /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/kimg_avif.so

OK, so the plug-in is there.
Now I would like to know two things:

1) Check how the libavif was configured

Can you run following command?
avifdec

It should print what decoders and encoders the libavif is using. On my system it prints:
Version: 0.9.2 (dav1d [dec]:0.9.2, aom [enc/dec]:v3.1.2, rav1e [enc]:0.4.1 (0.4.1), svt [enc]:0.8.6)

2) Send us the AVIF file you are trying to open

You may also try what info this command prints:
avifdec --info your_file.avif
Comment 6 dnovomesky 2021-09-21 13:12:01 UTC
Created attachment 141765 [details]
qt-avif-image-plugin.xml

I believe that problem could be caused by the fact that Neon doesn't have image/avif mime type installed. It uses old shared-mime-info database.

That's why gwenview complains it cannot open application/octet-stream (but AVIF should be detected as image/avif )

You can also install the mime type manually.
Put following file
qt-avif-image-plugin.xml
into this folder:
/usr/share/mime/packages

In konsole run:
sudo update-mime-database /usr/share/mime/
Comment 7 Eridani Rodríguez 2022-05-03 19:03:30 UTC
Not OP, but can confirm that adding qt-avif-image-plugin.xml and running update-mime-database enabled Gwenview to open avif images and Dolphin to generate thumbnails.

Tested in daily driver KDE Neon with:
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

And neondocker:latest:
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.3

As a side note, this workaround was unneeded for Open SUSE Tumbleweed, as it properly opened avif images after installing kimageformats-5.93.0-248.3.
Comment 8 dnovomesky 2023-04-04 11:41:09 UTC
Today I tried neon-user-20230330-0719.iso and AVIF worked out of box.