Repository navigation
Highlights
- Removal of the
giodependency, making the thumbnailer much lighter and ~2.8x–3.6x faster - Breaking (CLI): Replaced positional arguments with explicit
-iand-ooptions
Changelog
- Extracts 3DS 24x24 small icons automatically when
-s <= 24or when--smallis passed - Added more CLI options (
-h/--help,-V, and long flags) and input validation - Many improvements to parsing, bounds checking, CIA fallback, and icon extraction (including fixing NDS icon transparency)
- Adaptive scaling filter selection based on format and target size
- Updated MIME definitions (fixing
.ndsthumbnails on newershared-mime-infosetups and syncing Azahar 3DS types) and AppStream metadata - Meson build fixes (default to
releasebuilds and dropCARGO_HOMEoverride)
Full Changelog: v1.2.1...v2.0.0
Benchmarking
v1.2.1 vs v2.0.0 for an NDS ROM at -s 256:
$ hyperfine -N --warmup 20 --runs 200 '/tmp/thumb-old "example/Chrono Trigger (USA) (En,Fr).nds" /tmp/nds.png -s 256' '/tmp/thumb-new -i "example/Chrono Trigger (USA) (En,Fr).nds" -o /tmp/nds.png -s 256'
Benchmark 1: /tmp/thumb-old "example/Chrono Trigger (USA) (En,Fr).nds" /tmp/nds.png -s 256
Time (mean ± σ): 8.4 ms ± 0.6 ms [User: 5.4 ms, System: 2.6 ms]
Range (min … max): 7.5 ms … 11.6 ms 200 runs
Benchmark 2: /tmp/thumb-new -i "example/Chrono Trigger (USA) (En,Fr).nds" -o /tmp/nds.png -s 256
Time (mean ± σ): 2.3 ms ± 0.1 ms [User: 1.7 ms, System: 0.5 ms]
Range (min … max): 2.1 ms … 2.6 ms 200 runs
Summary
/tmp/thumb-new -i "example/Chrono Trigger (USA) (En,Fr).nds" -o /tmp/nds.png -s 256 ran
3.61 ± 0.31 times faster than /tmp/thumb-old "example/Chrono Trigger (USA) (En,Fr).nds" /tmp/nds.png -s 256
v1.2.1 vs v2.0.0 for a CIA file at -s 256:
$ hyperfine -N --warmup 20 --runs 200 '/tmp/thumb-old "example/Pokemon AlphaSapphire-dec.cia" /tmp/cia.png -s 256' '/tmp/thumb-new -i "example/Pokemon AlphaSapphire-dec.cia" -o /tmp/cia.png -s 256'
Benchmark 1: /tmp/thumb-old "example/Pokemon AlphaSapphire-dec.cia" /tmp/cia.png -s 256
Time (mean ± σ): 9.6 ms ± 1.5 ms [User: 6.3 ms, System: 2.8 ms]
Range (min … max): 7.5 ms … 16.1 ms 200 runs
Benchmark 2: /tmp/thumb-new -i "example/Pokemon AlphaSapphire-dec.cia" -o /tmp/cia.png -s 256
Time (mean ± σ): 3.5 ms ± 0.1 ms [User: 2.7 ms, System: 0.6 ms]
Range (min … max): 3.2 ms … 3.8 ms 200 runs
Summary
/tmp/thumb-new -i "example/Pokemon AlphaSapphire-dec.cia" -o /tmp/cia.png -s 256 ran
2.78 ± 0.45 times faster than /tmp/thumb-old "example/Pokemon AlphaSapphire-dec.cia" /tmp/cia.png -s 25`6