-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathREADME
40 lines (27 loc) · 1.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
smlr
* This project is experimental and needs some tuning. *
Re-encode jpeg images with no perceivable quality loss.
Uses the butteraugli psychovisual comparison and k-ary search to determine the best jpeg quality setting that will not "appear" degraded.
Installation:
1. Clone https://github.com/google/butteraugli.
2. Run `make` in the `src/` directory to build the `compare_pngs` binary.
3. Move `compare_pngs` to some folder in your `PATH`
4. `go get github.com/jasonmoo/smlr`
Use:
smlr -if my_image.jpg -of my_image.best.jpg
Flags available:
-if string
file to process
-of string
output file
-width int
width to resize to. omitting either width or height will maintain proportion.
-height int
height to resize to. omitting either width or height will maintain proportion.
-max float
maximum deviation detected (default 1.1)
-cores int
how many cores to use (default runtime.NumCPU())
Inspired by:
https://medium.com/@duhroach/reducing-jpg-file-size-e5b27df3257c
LICENSE: MIT