Python script for cropping clear borders of any color in images with some degree of noise tolerance.
More information is available in previous version's readme
- Uses pyvips/libvips instead of Pillow for 16-bit/band and more format support
- Resizes images using Magic Kernel Sharp (a=6, v=7), Numpy + Numba resizer implementation
- Detects grayscale images saved as RGB and converts them back to grayscale (pyvips + numpy implementation)
- Saves 16-bit/band images after resizing (8-bit input images without resizing will be saved as 8-bit)
- Settings are saved in JSON with an ability to load custom settings files
- Can save and load job JSONs with custom settings for any file
- Saves to PNG (up to 16 bit), JXL (internal libvips, up to 16 bit), AVIF (still external, because internal ilbvips encoder doesn't support 8+ bit images; up to 12 bit)
- Option to ignore already vertically cropped space in horizontal crop
Optional: pyvips-binary (Makes calls to libvips faster)
Tested on Python 3.13.1, pyvips 3.0.0, pyvips-binary 8.16.1, Numpy 2.2.5, Numba 0.61.2.
Requires external native libvips library.