Skip to content

josexy/feather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feather

An image compression tool written in Rust, supporting PNG, JPEG, and WebP formats.

Installation

From Source

git clone https://github.com/yourusername/feather.git
cd feather
cargo build --release

From Github Release

https://github.com/josexy/feather/releases

Usage

Basic CLI Usage

# Compress a single file
feather input.jpg -o output.jpg

# Compress a directory recursively
feather input_dir/ -r -o output_dir/

# Compress in-place (overwrites original files)
feather images/ -r --in-place

# Compress with backup
feather images/ -r --in-place --backup

File Size Filtering

Only compress files larger than 5MB

feather input_dir/ -r --min-size 5M -o output_dir/

Only compress files smaller than 10MB

feather input_dir/ -r --max-size 10M -o output_dir/

Compress files between 5MB and 10MB

feather input_dir/ -r --min-size 5M --max-size 10M -o output_dir/

Quality Settings

# Set JPEG quality (1-100, default: 85)
feather input.jpg --jpeg-quality 90 -o output.jpg

# Enable PNG lossy compression with quality (1-100)
feather input.png --png-lossy --png-quality 80 -o output.png

# Set WebP quality (1-100, default: 80)
feather input.webp --webp-quality 85 -o output.webp

Image Resizing

# Resize to maximum width of 1920px
feather input.jpg --max-width 1920 -o output.jpg

# Resize to maximum height of 1080px
feather input.jpg --max-height 1080 -o output.jpg

# Set both width and height constraints
feather input.jpg --max-width 1920 --max-height 1080 -o output.jpg

Pattern Matching

# Only process JPEG files
feather images/ -r --glob-pattern "*.jpg" -o output/

# Process multiple patterns
feather images/ -r --glob-pattern "*.{jpg,jpeg,png}" -o output/

About

Image compression tool written in Rust

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors