|
|
4 months ago | |
|---|---|---|
| Sources/JXLOptim | 4 months ago | |
| .gitignore | 4 months ago | |
| Package.swift | 4 months ago | |
| README.md | 4 months ago | |
| bundle.sh | 4 months ago | |
An ImageOptim-style drag-and-drop optimizer that re-encodes JPG / PNG / GIF into
JPEG XL (.jxl). Native SwiftUI, macOS 12+. Wraps the cjxl encoder from
libjxl.
brew install jpeg-xl # provides cjxl / djxl
The app looks for cjxl in /usr/local/bin, /opt/homebrew/bin, /usr/bin.
If it isn't found you'll see a red banner with the install hint.
swift run # dev: launches the window
./bundle.sh # builds "JXL Optim.app" (release, double-clickable)
open "JXL Optim.app"
Drop images onto the window. Each is converted to a sibling .jxl; the row shows
before → after and the percentage saved. A running total sits at the bottom.
Controls:
cjxl -d 0). PNG/GIF stay perfect; JPEG is
transcoded losslessly (decode-back gives the original).d0.5–d3.0 (lower = better). d1 ≈ visually lossless.cjxl in.png out.jxl -e <effort> --num_threads 0 [-d 0 | -d <distance>]
讲解文章在 Niamos vault: wiki/projects/自己写一个 JPEG XL 压缩器.md。