Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rfdzan/smoljpg

A command-line tool to compress jpgs in a directory.
https://github.com/rfdzan/smoljpg

cli jpg rust turbojpeg

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# This cli tool is now a rust crate available on crates.io! Check out [jippigy](https://crates.io/crates/jippigy)
# smoljpg
A multi-threaded JPG compression tool, powered by [turbojpeg](https://github.com/honzasp/rust-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:
```bash
cargo build --release
```
Put the binary file in `PATH` so you can use it from anywhere.

# Examples
Compress with default parameters:
```bash
cd your_image_dir/
smoljpg
```
The tool comes with the following defaults:
1. Quality: `50`
2. Output directory name: `compressed/`.

Compress with custom parameters:
```bash
cd your_image_dir/
smoljpg 80
smoljpg -o dest/ 80 #create a directory with a custom name
```
Compress single images:
```bash
smoljpg -s path/to/your/image.jpg
```
Single images will be stored where your current working directory is.

Help:
```bash
smoljpg -h
```