/smoljpg

A command-line tool to compress jpgs in a directory.

Primary LanguageRustMIT LicenseMIT

This cli tool is now a rust crate available on crates.io! Check out jippigy

smoljpg

A multi-threaded JPG compression tool, powered by turbojpeg.

Why

DSLR Fine JPGs are quite large in size(>10MB), uploading a large number of them to social media platforms can take a lot of time.

How to use

Compile it:

cargo build --release

Put the binary file in PATH so you can use it from anywhere.

Examples

Compress with default parameters:

cd your_image_dir/
smoljpg

The tool comes with the following defaults:

  1. Quality: 50
  2. Output directory name: compressed/.

Compress with custom parameters:

cd your_image_dir/
smoljpg 80
smoljpg -o dest/ 80 #create a directory with a custom name

Compress single images:

smoljpg -s path/to/your/image.jpg

Single images will be stored where your current working directory is.

Help:

smoljpg -h