Skip to content

GopherSnap is a high-performance, concurrent CLI image converter written in Go. It allows you to batch process images with efficiency, supporting modern formats like WebP and AVIF.

License

Notifications You must be signed in to change notification settings

benjaminjvdm/GopherSnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GopherSnap

GopherSnap is a high-performance, concurrent CLI image converter written in Go. It allows you to batch process images with efficiency, supporting modern formats like WebP and AVIF.

Features

  • Batch Conversion: Process entire directories of images at once.
  • Concurrent Processing: Leverages Go's goroutines for fast, parallel execution.
  • Modern Formats: Supports JPG, PNG, WebP, and AVIF.
  • No CGO: Uses pure-Go/WASM implementations for WebP and AVIF for easy portability.
  • Interactive Progress: Real-time feedback with a styled progress bar.

Installation

Ensure you have Go installed on your system. Then, you can install GopherSnap using:

go install github.com/benjaminjvdm/GopherSnap@latest

Alternatively, clone the repository and build it manually:

git clone https://github.com/benjaminjvdm/GopherSnap.git
cd GopherSnap
go build -o gophersnap

Usage

GopherSnap provides a simple convert command to handle your image processing needs.

Basic Example

Convert all images in a folder to WebP:

gophersnap convert -i ./input-images -o ./output-images -f webp

Advanced Usage

Convert a specific file to AVIF with custom quality and concurrency:

gophersnap convert -i photo.jpg -o ./optimized -f avif -q 75 -j 8

Available Flags

  • -i, --input string: Input file or directory (Required)
  • -o, --output string: Output directory (Default: ./output)
  • -f, --format string: Output format: jpg, png, webp, avif (Default: webp)
  • -q, --quality int: Image quality (0-100) (Default: 80)
  • -j, --jobs int: Number of concurrent jobs (Default: 4)
  • --overwrite: Overwrite existing files if they exist in the output directory

About

GopherSnap is a high-performance, concurrent CLI image converter written in Go. It allows you to batch process images with efficiency, supporting modern formats like WebP and AVIF.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages