What's New
Added
- Batch processing: process multiple images in one command, in parallel
- Pass paths individually:
bgone a.png b.png c.png
- Or quote a glob and let bgone expand it:
bgone 'images/*.png' (recommended — also works on Windows)
- Or let your shell expand a glob on Unix-like systems:
bgone images/*.png
--out-dir <PATH> flag: route all batched outputs into a single directory (created automatically if missing). Omit it and each output lands next to its input with the usual -bgone suffix
--bg-threshold FLOAT flag: force near-background pixels to fully transparent. Useful for cleaning up JPEG artifacts and faint color noise that previously left a ghost when the image was composited
- Per-channel distance in
0.0–1.0 (0.004 ≈ 1 RGB unit per channel, 0.02 ≈ 5)
- Default
0.0 preserves the existing behavior (only exact background matches snap)
Changed
- BREAKING:
--threshold (and the -t shorthand) renamed to --fg-threshold for symmetry with the new --bg-threshold. Existing scripts using either form will need to update
bgone input.png output.png still works for single-file output, but bgone now refuses to overwrite an existing file in the output slot. This prevents the case where bgone images/*.png matches exactly two files and silently treats one as the output. To process two (or any number of) files as a batch, use --out-dir
- Library API (BREAKING):
process_image now takes a ProcessOptions struct in place of a long positional arg list; process_image_with_options is removed (the quiet flag moves into ProcessOptions). See the README for the new signature
Fixed
- Library callers passing
strict_mode: true with no foreground colors now get a clear error instead of silent nonsense (the CLI already rejected this case)
Installation
Homebrew (macOS)
brew tap benface/bgone
brew install bgone
Cargo
Checksums (SHA256)
bgone-v0.6.0-aarch64-apple-darwin.tar.gz: bbd20ead12f1bba297e6e4de18156adfde8c66f98959298a668d5b86b9472216
bgone-v0.6.0-x86_64-apple-darwin.tar.gz: 0d9d90410decc9b2c9de9e6063ce43448dbbcbca206c486afa7d78f2b84cf408