squale

Crates.iosquale
lib.rssquale
version1.0.1
sourcesrc
created_at2023-03-04 17:59:38.072924
updated_at2023-07-07 20:15:49.383392
descriptiona tiny image scaling utility
homepage
repositoryhttps://github.com/Canop/squale
max_upload_size
id800733
size74,596
Denys Séguret (Canop)

documentation

README

squale

MIT Latest Version Chat on Miaou

A small utility upscaling or downscaling images.

Installation

cargo install squale

Usage

Specify the dimensions that output images must fit and pass image path(s) as argument:

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 (real image dimensions may be smaller, as proportions are kept).

For example, assuming you have those files:

tree-before

Run

squale --fit 800x600 trav/tracteurs/*

Then, you'll get

tree-after

List of arguments is available on squale --help

Output images

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, and 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.

Commit count: 7

cargo fmt