A fast, simple tool that removes colored backgrounds from images and gives you clean, smooth edges.
https://github.com/sergiotapia/chroma
Chroma finds the background color on its own and makes it see-through. It uses a blur trick to make the edges look smooth instead of jagged.
./chroma -i ./example-images/ -v
Benchmarks run on Arch Linux (AMD Ryzen 9 9950X, 92GB RAM) with libvips 8.17.3, averaged over 3 runs per size:
| Resolution | Megapixels | Total Time | Save Time | Processing Rate |
|---|---|---|---|---|
| 640x480 | 0.3 MP | ~10ms | ~1ms | ~100 images/sec |
| 1280x720 | 0.9 MP | ~11ms | ~2-3ms | ~90 images/sec |
| 1920x1080 | 2.1 MP | ~12ms | ~3-4ms | ~80 images/sec |
| 2560x1440 | 3.7 MP | ~14ms | ~5ms | ~70 images/sec |
| 3840x2160 (4K) | 8.3 MP | ~17ms | ~7-8ms | ~60 images/sec |
| 5120x2880 (5K) | 14.7 MP | ~21ms | ~12ms | ~48 images/sec |
| 6000x4000 | 24 MP | ~27ms | ~18ms | ~37 images/sec |
| 8000x6000 | 48 MP | ~41ms | ~32ms | ~24 images/sec |
| 10000x7500 | 75 MP | ~62ms | ~52ms | ~16 images/sec |
It looks pretty cool. Does it only work for single-color backgrounds?
Good to see more end-user programs.