| Filename | Latest commit message | Latest commit date |
|---|---|---|
- KDE thumbnailer: texture loader, decodes only the mip it needs; GPU blocks, 16-bit and float via the new yapf_tex_to_rgba8. Tested through KDE's plugin loader with KF6 from nixpkgs. - Photoshop: shows the tool's error message; HDR textures open as 32-bit (.hdr), 16-bit stays 16-bit; 16-bit documents save as 16-bit. - CLI: 16-bit PNG export, readable conversion errors. - default.nix: yapf tool, library, header, MIME type and thumbnailer (absolute store path); runs the test suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVrVthWN8GsmgHGUhhsCYm |
||
| .. | ||
| CMakeLists.txt | ||
| kde-shell.nix | ||
| README.md | ||
| yapfthumbnail.cpp | ||
| yapfthumbnail.json | ||
YAPF thumbnails for KDE (Dolphin)
Shows previews of .yapf files in Dolphin, the KDE file dialogs and
anything else that uses KIO thumbnails. KDE Frameworks 6 / Plasma 6.
Files with mipmaps are thumbnailed from the nearest mip level, so even huge
textures preview instantly.
Build and install
You need CMake, a C/C++ compiler and the KDE development packages:
| System | Packages |
|---|---|
| Arch / Manjaro | sudo pacman -S cmake extra-cmake-modules kio |
| Debian / Ubuntu | sudo apt install cmake extra-cmake-modules libkf6kio-dev qt6-base-dev |
| Fedora | sudo dnf install cmake extra-cmake-modules kf6-kio-devel qt6-qtbase-devel |
| openSUSE | sudo zypper install cmake kf6-extra-cmake-modules kf6-kio-devel qt6-base-devel |
| NixOS | nix-shell kde-shell.nix (in this folder) |
cd extensions/kde
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
sudo cmake --install build
update-mime-database /usr/share/mime
This installs the plugin (kf6/thumbcreator/yapfthumbnail.so) and the
image/x-yapf file type. Then in Dolphin: Settings → Configure Dolphin →
Interface → Previews, tick YAPF Images, and turn previews on.
Without root (per user, also NixOS)
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local
cmake --build build && cmake --install build
update-mime-database ~/.local/share/mime
mkdir -p ~/.config/plasma-workspace/env
echo 'export QT_PLUGIN_PATH="$HOME/.local/lib/plugins:$QT_PLUGIN_PATH"' > ~/.config/plasma-workspace/env/yapf.sh
Log out and back in, then enable YAPF Images in Dolphin's preview settings.
(Some distributions use lib64/plugins or lib/qt6/plugins; cmake --install prints the exact folder.)
Status
Built against KF6 / Qt 6 and tested by loading the plugin through KDE's plugin factory and creating thumbnails (RGBA, RGB, mipmapped, wide images; corrupt files are rejected). Not yet tried inside a running Dolphin.
Reads YAPF version 1 and 2: GPU blocks (BC1–BC7, BC6H), 16-bit and float textures, cubes (face +X), arrays, volumes and animations (the first image). Only the mip level the thumbnail needs is decoded. Tested with KF6 from nixpkgs 25.05 on BC7, BC5, BC6H, half float, 16-bit, cube and animation files. ETC2 / ASTC files get no thumbnail.