A small utility upscaling or downscaling images.
bash
cargo install squale
Specify the dimensions that output images must fit and pass image path(s) as argument:
bash
squale --fit 800x600 trav/tracteurs/*
Squale filters out non images and files whose name looks like its own output.
Generated images are named according to the specified fitting rectangle.
For example, assuming you have those files:
After running the command above, you'll get
List of arguments is available on squale --help
Images are scaled up or down with the Lanczos sampling algorithm (window 3) which isn't terribly fast but gives excellent results.
Scaled PNG, ICO, BMP images are saved as PNG.
Other kinds of images are saved as JPEG. Default quality is 85 but it can be changed with the --jpeg-quality
parameter.