257.68. kimageformats-6.31.0
KDE Frameworks: QImage plugins for AVIF, HEIF, JPEG XL, JPEG 2000, EXR, RAW, PSD, XCF, Krita and more
6.31.0-1 · LGPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND (LGPL-2.1-only OR LGPL-3.0-only) AND BSD-3-Clause · 5.0 SBU · 4.7 MiB, 36 files · 43_toolkits, 199 of 344 · ports/core/kf6/kimageformats
Homepage: https://invent.kde.org/frameworks/kimageformats
KImageFormats is a set of Qt image format plugins, so that every Qt program that reads an image through QImageReader also reads AVIF, HEIF, JPEG XL, JPEG 2000, OpenEXR, camera raw files, DirectDraw surfaces, Krita and OpenRaster documents, Photoshop, GIMP’s XCF, Radiance HDR, QOI and a dozen older formats. gwenview and kolourpaint name it in depends; thumbnails in Dolphin and the file dialogs use the same plugins.
Depends on: cmake, ninja, pkgconf, extra-cmake-modules, qt6-qtbase, karchive, libavif, libheif, libjxl, openjpeg, openexr, libraw, ghostscript.
Required by (4): gwenview, koko, kolourpaint, kscreen.
Sources: kimageformats-6.31.0.tar.xz (32.9 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install kimageformats'
build.sh:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KIMAGEFORMATS_DDS=ON \
-D KIMAGEFORMATS_HEIF=ON \
-D KIMAGEFORMATS_JXL=ON \
-D KIMAGEFORMATS_JP2=ON \
-D KIMAGEFORMATS_WITH_KNOWN_CRASHES_JXR=OFF \
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6Archive=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_libavif=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_OpenEXR=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_OpenJPEG=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_LibRaw=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
-D KIMAGEFORMATS_DDS=ON— Build the DirectDraw Surface plugin. It is upstream’s default, written out with the others so the recipe states every format it builds.-D KIMAGEFORMATS_HEIF=ON— Build the HEIF and HEIC plugin, through libheif. Upstream’s default is off. The configure looks for libheif through pkg-config with no way to make it a requirement, so a missing libheif would leave the plugin out with only a line in the summary; it is independs.-D KIMAGEFORMATS_JXL=ON— Build the JPEG XL plugin, through libjxl, looked for through pkg-config in the same way. It is upstream’s default.-D KIMAGEFORMATS_JP2=ON— Build the JPEG 2000 plugin, through openjpeg. It is upstream’s default.-D KIMAGEFORMATS_WITH_KNOWN_CRASHES_JXR=OFF— Build no JPEG XR plugin. Upstream keeps it off by default and names the switch for its known crashes, and the jxrlib it needs is not a port.-D CMAKE_REQUIRE_FIND_PACKAGE_KF6Archive=ON— Make karchive a requirement, for the Krita (.kra) and OpenRaster (.ora) plugins, which read the image out of the zip container. Upstream looks for it as optional and leaves both formats out without it.-D CMAKE_REQUIRE_FIND_PACKAGE_libavif=ON— Make libavif a requirement, for the AVIF plugin.-D CMAKE_REQUIRE_FIND_PACKAGE_OpenEXR=ON— Make openexr a requirement, for the OpenEXR plugin.-D CMAKE_REQUIRE_FIND_PACKAGE_OpenJPEG=ON— Make openjpeg a requirement, for the JPEG 2000 plugin.-D CMAKE_REQUIRE_FIND_PACKAGE_LibRaw=ON— Make libraw a requirement, for the camera raw plugin.
Directories: /usr/lib/cmake/KF6ImageFormats, /usr/share/licenses/kimageformats.
Each of the five libraries the CMAKE_REQUIRE_FIND_PACKAGE_ switches name is optional upstream, and a missing one would leave its formats out with only a line in the configure summary.
The EPS plugin is built whenever Qt Print Support is found, which it always is in qt6-qtbase. It renders through Ghostscript’s gs, which it runs at read time and without which it reads nothing, so ghostscript is a run-time dependency in depends.
The tarball is about 34 MB: most of it is the test images under autotests/, which BUILD_TESTING=OFF leaves unread.