This is a collection of KDE Dolphin service menus with tools for Images, PDF files and Videos.
Instead of shell scripts that call ImageMagick and friends, every menu entry runs a small native program: a Rust core with a Qt6 shell. All tools have a setup app where you can define your own functions without coding.
Every tool is a separate package, so you install only what you need.
Get pictures ready for e-mail, messengers, websites and online galleries in one click: the right size, format and quality together, with the metadata you want to share and nothing more. No ImageMagick needed.
- Optimise for e-mail, sharing, websites (WebP) and online galleries, with or without the location. The format is picked automatically: JPEG for photos, PNG for graphics and transparency.
- Shrink losslessly: removes metadata from JPEG without re-encoding and recompresses PNG.
- Resize to 800, 1280 or 1920 px, to 50 %, or to 1200 × 630 for social media.
- Convert to JPEG, PNG, WebP or AVIF. Reads HEIC, TIFF, BMP, GIF, QOI and more.
- Rotate and mirror, or straighten using the Exif orientation.
- Show metadata (camera, lens, exposure, date, location) and remove all metadata.
| Context menu | Setup app |
|---|---|
![]() |
![]() |
Everyday PDF work without opening an editor: put files together, take pages out, and make big scans small enough to send.
- Merge into one PDF, sorted by name the way Dolphin shows them ("Part 2" before "Part 10"), or in your own order with Merge….
- Split into single pages and extract pages (
1-3, 5,8-,odd,even,last). - Rotate pages by 90° or 180° without touching their content.
- Compress for printing (images at 150 dpi) or for the screen (96 dpi).
- Compress scans to black and white, 8 colours or JPEG. Only scanned pages are changed; text pages and an OCR text layer stay as they are. A noisy 5.6 MB scan becomes 0.26 MB in black and white.
- Export pages as PNG or JPEG, extract the embedded images or the text.
| Context menu | Setup app |
|---|---|
![]() |
![]() |
Make videos small enough to share, or reach a size limit exactly. Uses ffmpeg.
- Compress for sharing (720p, small) or with good quality (1080p).
- Compress to 25 MB or 10 MB: two passes aim at the size, for mail and messenger limits.
- Compress with H.265 (1080p, about half the size).
- Convert to MP4 that plays everywhere (H.264/AAC).
- Remove the audio track or extract it without re-encoding.
| Context menu | Setup app |
|---|---|
![]() |
![]() |
Many service menus are hard to install because of their dependencies. kniff comes as ready-made packages that pull in everything they need. Download them from the releases page:
sudo apt install ./kniff-image_*_amd64.deb # Debian 12+, Ubuntu 24.04+
sudo dnf install ./kniff-image-*.x86_64.rpm # Fedora 44+
sudo zypper install --allow-unsigned-rpm ./kniff-image-*.x86_64.rpm # openSUSE Tumbleweed, Leap 16The same goes for kniff-pdf and kniff-video; aarch64 packages are there too. The entries
show up in Dolphin's context menu right away (or after restarting Dolphin).
kniff-video uses the distribution's ffmpeg. Fedora's ffmpeg-free and openSUSE's ffmpeg work; the
full ffmpeg from RPM Fusion or Packman (with x264) gives smaller files at the same quality.
Packages for your distribution missing? Please open an issue.
- All functions of a tool sit in one context submenu (e.g. Image tools ▸), grouped by separators, each entry with its own icon. Alternatives in the settings: one submenu per task, or all entries directly in the context menu.
- A click in the context menu runs a preset right away. A progress window appears only if the run takes a moment. At the end a notification offers "Show in folder".
- Originals are never overwritten. Results get a suffix (
photo_1280.jpg), or go into a subfolder, or replace the original only if a preset says so. - All entries are presets you can edit. Start the tool without arguments, or use
Settings… at the bottom of a submenu. Saving writes your own service menu into
~/.local/share/kio/servicemenus/, which replaces the packaged one. "Restore defaults" removes it. - Presets live in
~/.config/kniff/(image.toml,pdf.toml,video.toml).
| A preset run with options (here "Optimise…") | Merging PDFs in your own order |
|---|---|
![]() |
![]() |
Command line (scripts, tests):
kniff-image-cli presets
kniff-image-cli run --preset resize-1280 *.jpg
kniff-image-cli run --resize 1600 --quality 80 --strip --suffix _small *.jpg
kniff-image-cli run --resize 1200x630! --format webp photo.png # fill & crop
kniff-image-cli info photo.jpg # camera, date, location, …
kniff-pdf-cli run --preset scan-bw scan.pdf # scans → black and white, 300 dpi
kniff-pdf-cli merge --keep-order c.pdf a.pdf b.pdf
kniff-pdf-cli run --pages "1-3, last" report.pdf
kniff-video-cli run --preset share clip.mp4
kniff-video-cli run --size 25 --max 720 clip.mov # aim for 25 MBkniff-video needs ffmpeg/ffprobe. It prefers libx264; with Fedora's ffmpeg-free it falls
back to libopenh264 (bitrate-based). H.265 needs libx265, AV1 libsvtav1 or libaom.
Requirements: Rust ≥ 1.95, CMake ≥ 3.22, Qt 6 (Core, Gui, Widgets, DBus), a C++20 compiler; ffmpeg for kniff-video's tests and runtime.
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
scripts/smoke-test.sh build
scripts/install-local.sh # into ~/.local (needs ~/.local/bin in PATH)Single tools: -DKNIFF_BUILD_IMAGE=OFF, -DKNIFF_BUILD_VIDEO=OFF, -DKNIFF_BUILD_PDF=OFF.
scripts/build-packages-container.sh # one .deb and .rpm per tool into dist/, built in Debian 12
scripts/test-packages.sh # install them on Debian, Ubuntu, Fedora, openSUSE and run the smoke testThe packages are built on the oldest supported system (Debian 12: glibc 2.36, Qt 6.4), so one
.deb fits Debian 12+ and Ubuntu 24.04+, and one .rpm fits Fedora and openSUSE (it names its
libraries by soname). They are made with nfpm, which
scripts/build-packages.sh downloads if needed. The release workflow does the same for x86_64
and aarch64 and publishes a GitHub release for a v* tag.
Image decoding and encoding use craft-libs, PDF work uses
the crates of pdfcraft (pinned to a main commit that uses
the same craft-libs rev as kniff, so each craft crate exists once). pdfcraft patches a few
crates.io crates (hayro, lopdf, vello); patches only apply in the root workspace, so kniff's
Cargo.toml repeats them under [patch.crates-io]. Keep them in step when moving the pin. It has no
releases yet, so Cargo.toml pins a commit (rev = …). To develop against a local checkout:
scripts/dev-patch.sh on [/path/to/craft-libs] # writes the git-ignored .cargo/config.toml
scripts/dev-patch.sh off # back to the pinned commitDon't commit Cargo.lock while the patch is on. To move to a newer craft-libs: update rev
in Cargo.toml, run cargo test --workspace, commit.
crates/core presets (TOML), output naming, parallel jobs, i18n (.po), service menu generator
crates/image-ops image pipeline (the only crate that uses craft-libs)
crates/video-ops video pipeline (drives ffmpeg/ffprobe)
crates/pdf-ops PDF operations (facade over pdfcraft) + scan compression to indexed colours
crates/ffi-core shared C ABI: strings, i18n, preset/menu plumbing, jobs
crates/ffi-<tool> one static library per tool (JSON + callbacks), linked into its Qt shell
apps/*-cli headless command line tools
qt-shell/common start-up, settings dialog, preset form base, progress, notifications (shared)
qt-shell/<tool> the tool's preset form and extras (image: metadata viewer, pdf: merge order dialog)
po/<domain>/ translations; scripts/update-pot.sh refreshes the templates
po/common/*.po holds strings shared by all tools, po/image, po/video and po/pdf the tools'
own strings. The
catalogs are compiled into the binaries and also used for the context menu entries
(Name[xx]=). After changing strings run scripts/update-pot.sh.
GPL-3.0-or-later







