Repository navigation
fix(preview): decode WebP previews and thumbnails without system loaders - #2189
Conversation
The preview sandbox relied on a GDK Pixbuf WebP loader or ImageMagick, so WebP previews and thumbnails stayed empty where neither is installed, as reported on Pop!_OS 24.04. Decode WebP with the image crate's built-in decoder first, read its dimensions from the same decoder so the decoded frame budget still applies, and route browser thumbnails through the same fallback chain as previews. Refs lgse#1656
The decoder applies EXIF orientation, but no test would fail if it stopped. Give the direct decoder test a rotated fixture so it checks the upright result.
Review and cleanupMerged Review against the description and #1656. No reviews or inline comments existed. No blockers found.
Fixes pushed
Tests and comments. No tests removed. The table-driven preview/thumbnail test and the oversized test each gain a WebP axis that exercises new code ( Manual verification (debug build, Arch host)
Validation
Follow-ups outside this PR
CI: all checks green on |
Description
WebP previews and thumbnails stayed empty on systems with neither a GDK Pixbuf WebP loader nor ImageMagick, as reported on Pop!_OS 24.04 in #1656. The sandbox helper now decodes WebP with the
imagecrate's built-in decoder (already a dependency) before trying GDK Pixbuf, ImageMagick and dcraw.Visual evidence
How to test
webp-pixbuf-loaderandimagemagick), open a folder containing.webpimages.Expected result: every WebP file shows a thumbnail in the file list and an image in the preview panel. Photos with an EXIF orientation appear upright.
Related issue
Refs #1656 (follow-up comment about WebP previews on Pop!_OS 24.04). No separate issue was opened for this follow-up.