This repository is archived. It stays online as a reference for how KDE's image filter can be called from a Qt application.
ImageFilter::shadowBlur() from KDE's kio image filter takes a QImage, a blur radius and a shadow colour, and writes a soft drop shadow around the painted content. This demo wraps it in a minimal Qt Widgets project so the effect can be tried out and compared without pulling in the whole KDE stack.
Two copies of the upstream filter are kept for comparison:
| Directory | Origin |
|---|---|
stackblur/master/ |
KDE/kio-extras — thumbnail/imagefilter.cpp |
stackblur/sinp-4.14/ |
KDE/kdelibs 4.14 — kio/kio/imagefilter.cpp |
main.cpp builds a 200×200 ARGB image, paints a shape into it, calls ImageFilter::shadowBlur(image, radius, shadowColor) and writes the result to disk, so the radius and shadow colour can be tuned by editing two values and running the program again.
Requirements: CMake 3.16+, a C++17 compiler and Qt 5.15 or Qt 6 with the Widgets module.
cmake -B build -S .
cmake --build build -j| SunnyCapturer series | https://sunny.xmuli.tech/ |
| Screenshot tool archive | https://screenshot-archive.xmuli.tech/ |
Part of the SunnyCapturer series by XMuli.