Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/rfdzan/smoljpg
- Owner: rfdzan
- License: mit
- Created: 2024-03-10T15:07:09.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-06-08T04:25:39.000Z (7 months ago)
- Last Synced: 2024-06-08T05:29:51.247Z (7 months ago)
- Topics: cli, jpg, rust, turbojpeg
- Language: Rust
- Homepage:
- Size: 71.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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
```