The very recent news about Spectacle supporting JXL (JPEG-XL) makes me wonder if we can also distribute Plasma wallpapers in this format. Currently, they are in PNG, and sum to a >200MB (and growing) download.
So I took Next/7680x2160.png for a test. With cjxl -q 100 lossless compression, the result is a not very impressive 30% cut from 9.0MB to 6.3MB. However, with a slightly lossy cjxl -q 96 quality setting, it’s down to 800KB, a more than 10x cut. ImageMagick gives a PSNR of 50+ between the two, so I guess they are similar enough. I can’t visually spot any difference at 8x zoom, anyway.
Is support guaranteed to be in KDE software, or can we not count on it being there?
KImageFormat has an optional dependency on libjxl. So we probably need to make it a hard dependency for plasma-wallpapers.
Can modern GPUs decode it in hardware?
libjxl being a reference implementation, my guess is it’s CPU-only. But decoding speed is probably not a big issue for wallpapers.
GNOME wallpapers are currently in JXL format. So I tried adding everything in /usr/share/backgrounds/gnome in the Plasma wallpaper dialog, and it seems working alright. (Except “Cannot load metadata from file (Error # %1: The file contains data of an unknown image type )” messages in the journal, which I guess could be easily fixed.)
A previous effort to do this with the AVIF format ran into one or more of those issues, if I recall.
Could you point me to that? All I find is this webp effort, not idea why it was abandoned:
The AVIF effort was something that someone emailed to me, and unfortunately I failed to follow up on it properly after identifying challenges.
But this all sounds very promising. Would you be able to create a formal proposal over at Work items · Plasma / Plasma Workspace Wallpapers · GitLab? It sounds like what we would want to do here is convert to JXL at compile-time, so we can keep lossless versions in the repo.