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

https://github.com/romainmenke/simple-guetzli

Batch Guetzli compressions in a manageable fashion
https://github.com/romainmenke/simple-guetzli

batch-processing compressed guetzli jpeg-encoder

Last synced: about 1 year ago
JSON representation

Batch Guetzli compressions in a manageable fashion

Awesome Lists containing this project

README

          

# Simple Guetzli

A Guetzli compression helper

`go get github.com/romainmenke/simple-guetzli`

or download from the latest [release](https://github.com/romainmenke/simple-guetzli/releases).

This requires : [Guetzli](https://github.com/google/guetzli)

---

### Why?

Guetzli is cpu intensive and waiting for builds / compiles /... is something we all like to avoid.
This little tool keeps a log of compressed files and skips those that have already been done.

Now you can safely watch a folder with images and compress only that what needs to be done.

In short :

- compresses an entire folder at once
- executes compressions in parallel
- tracks what has been compressed
- determines file changes and recompresses

Useful :

- cancel at any time, finished compressions will not need to be redone.
- manage max threads.
- max memory is divided by number of Guetzli instances (so 1000mb ram with 4 threads will give 250mb ram for each)
- dontgrow flag deletes image files that got bigger because Geutzli failed to shrink them.
- copy flag to keep your input and output dirs in sync despite Guetzli errors or files that grew.

---

### Options

```
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-q, --quality=95 Visual quality to aim for, expressed as a JPEG quality value. Default value is 95.
--log="info" Log level
-m, --memlimit=6000 Memory limit in MB. Guetzli will fail if unable to stay under the limit. Default limit is 6000
--nomemlimit Do not limit memory usage.
-f, --force Force recompression
--force-quality Force recompression if quality changed
-t, --threads=3 Max concurrent threads. Default limit is 3
-g, --dontgrow Delete compressed files that got bigger
-c, --copy Copy all files from source folder to output, without overwriting compression results
-v, --version Guetzli Version

Args:
[] Source directory
[] Output directory
[] Log directory, the log is used to prevent duplicate compressions
```

---