Skip to content

Qt plug-in to allow Qt and KDE based applications to read/write AVIF images.

License

Notifications You must be signed in to change notification settings

nomacs/qt-avif-image-plugin

 
 

Repository files navigation

qt-avif-image-plugin

Qt plug-in to allow Qt and KDE based applications to read/write AVIF images.

Manual How to install AVIF support in KDE

What is AVIF?

AV1 Image File Format (AVIF) is an advanced image format specified by Alliance for Open Media.

AVIF is technically a picture compressed with AV1 video codec wrapped in ISO Base Media File Format.
AV1 compression provides significantly better efficiency than traditional JPEG. Beside 8bit per channel AVIF allows 10bit and 12bit depth, transparency, color profiles, metadata, animation, compression quality ranging from visually lossless to highly compressed lossy while maintaining decent visual quality at low bitrates.

1) Download

Download qt_avif_image_plugin_2020-03-20.zip, save in new folder and extract the content of the zip file:

unzip qt_avif_image_plugin_2020-03-20.zip

Recommended: read README.txt

SHA-256 of qt_avif_image_plugin_2020-03-20.zip: 62e138b0e3fa5b96762c772083a57c53814ddb91fe3848991685c898ab6c3614
Antivirus scan: VirusTotal

2) Adding MIME types

In order to install mime types image/avif and image/avif-sequence in your system, copy (as root) avif.xml, avifs.xml files to /usr/share/mime/packages/ folder and run:

update-mime-database /usr/share/mime

avif.xml
avifs.xml

3) Compile Qt Image Plugin

Qt Image Plugin allows Qt and KDE applications to open/save pictures in AVIF format. The plug-in uses libavif internally.
You need Qt5 development packages (for example qtbase5-dev), qmake, you may also need cmake and yasm.

If your system has libavif installed (at least version 0.6.0, check for the presence of /usr/include/avif/avif.h), run:

./build_libqavif_dynamic.sh

If you don't have libavif installed, run:

./build_libqavif_static.sh

4) Install libqavif.so

Copy libqavif.so to a folder where qt5-image-formats-plugins and/or kimageformats are installed. It could be one of these locations:

  • /usr/lib/qt5/plugins/imageformats
  • /usr/lib/qt/plugins/imageformats/
  • /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats

installed libqavif.so in /plugins/imageformats

5) Associate *.avif with applications

Qt based applications should be able to open AVIF images now.
Example how to associate AVIF file type with gwenview:

6) Enable AVIF thumbnails in dolphin file manager

Copy avif.desktop, avifs.desktop to:
/usr/share/kservices5/qimageioplugins/

Update imagethumbnail.desktop (in /usr/share/kservices5/ ):
Add ;image/avif;image/avif-sequence to the MimeType= list:

AVIF thumbnails in dolphin:

7) Enjoy using AVIF in applications

gwenview

AVIF picture in gwenview

KolourPaint

AVIF picture in kolourpaint

nomacs

AVIF images in nomacs

KPhotoAlbum

AVIF images in kphotoalbum

digiKam

AVIF images in digikam

qView

AVIF image in qView

About

Qt plug-in to allow Qt and KDE based applications to read/write AVIF images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 77.6%
  • C++ 13.9%
  • Objective-C 3.0%
  • Assembly 1.9%
  • CMake 1.6%
  • Raku 0.7%
  • Other 1.3%