This is a Qt image plugin for HEIF images, wrapping libheif. It enables
existing Qt applications to open and save .heic
files, such as those from
Apple devices.
Currently, support is limited to the following:
Note: This plugin is currently in progress for inclusion in qtimageformats. Please see the Qt Gerrit page or bug report for updates. Contributions should be made there, if possible. I will try to keep this repository up to date.
A PPA exists for Ubuntu users. For xenial and earlier, the libheif repository must also be enabled for dependencies.
$ sudo add-apt-repository ppa:jakar/qt-heif
$ sudo apt update
$ sudo apt install qt-heif-image-plugin
Packages built against buster and unstable are provided on the latest release page.
Package is available in the RPM Fusion free repository. To install it you need to enable RPM Fusion repo first - see Enable RPM Fusion on your system. Then it can be installed with following command:
$ sudo dnf install qt-heif-image-plugin
Users of other systems should build from source.
Runtime dependencies:
Build-only dependencies:
Get the source code:
$ git clone https://github.com/jakar/qt-heif-image-plugin.git
$ cd qt-heif-image-plugin
Configure with cmake and compile:
$ mkdir build
$ cd build
$ cmake ..
$ make
Finally, install:
$ sudo make install
The built library will be installed to $QTDIR/plugins/imageformats
. Beware
that CMAKE_INSTALL_PREFIX
will not be honored. Qt only searches in select
directories for plugins.
Alternatively, to use with a specific application, place the plugin in
$APPDIR/imageformats
, where $APPDIR
is the directory containing the
application's binary.
Any application that (directly or indirectly) uses QImageReader
to open image
files should automatically be able to use this plugin.
This has been successfully used with the following:
To test the plugin, Dumageview was created.