mirror of
https://github.com/axllent/goptimize.git
synced 2025-07-26 11:24:21 -04:00
Update README
This commit is contained in:
parent
c6ccb45a25
commit
b6ff2a7a5c
28
README.md
28
README.md
@ -1,8 +1,8 @@
|
||||
# Goptimizer - downscales and optimizes images
|
||||
# Goptimize - downscales and optimizes images
|
||||
|
||||
[](https://goreportcard.com/report/github.com/axllent/goptimize)
|
||||
|
||||
Goptimizer is a commandline utility written in Golang. It downscales and optimizes JPEG, PNG, GIF, TIFF and BMP files.
|
||||
Goptimize is a command-line utility written in Golang. It downscales and optimizes JPEG, PNG, GIF, TIFF and BMP files.
|
||||
|
||||
Image downscaling/rotation is done within goptimize (`-m <width>x<height>`, see [Usage](#usage-options)), however optimization is done using the following additional tools (if they are installed):
|
||||
|
||||
@ -11,19 +11,17 @@ Image downscaling/rotation is done within goptimize (`-m <width>x<height>`, see
|
||||
- pngquant
|
||||
- gifsicle
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
Both `jpegoptim` & `jpegtran` have almost identical optimization, so if both are installed then just `jpegtran` is used for JPG optimization. PNG optimization however will run through both `optipng` & `pngquant` (if installed) as this can result in better optimization.
|
||||
|
||||
It is highly recommended to install the necessary optimization tools, however they are not required to run goptimize.
|
||||
|
||||
Goptimize will remove all exif data from JPEG files, auto-rotating those that depend on it for orientation.
|
||||
GGoptimize will by default remove all EXIF data from JPEG files and automatically rotate those that rely on it for orientation. This can be disabled by adding the `-e` flag.
|
||||
|
||||
It will also preserve (by default) the file's original modification times (`-p=false` to disable).
|
||||
|
||||
Animated GIF files are not supported and automatically get skipped.
|
||||
|
||||
Animated GIF files are not supported and are ignored.
|
||||
|
||||
## Usage options
|
||||
|
||||
@ -46,7 +44,6 @@ Options:
|
||||
--optipng string optipng binary (default "optipng")
|
||||
```
|
||||
|
||||
|
||||
## Examples
|
||||
|
||||
- `./goptimize image.png` - optimize a PNG file
|
||||
@ -54,23 +51,10 @@ Options:
|
||||
- `./goptimize -m 1200x0 image.jpg` - optimize and downscale a JPG file to a maximum size of width of 1200px
|
||||
- `./goptimize -o out/ image.jpg` - optimize a JPG file and save it to `out/`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
Download the appropriate binary from the [releases](https://github.com/axllent/goptimize/releases/latest), or if you have golang installed
|
||||
|
||||
|
||||
### Build requirements
|
||||
|
||||
Go >= 1.21 required.
|
||||
Download the appropriate binary from the [releases](https://github.com/axllent/goptimize/releases/latest), or if you have golang installed you can install from source:
|
||||
|
||||
```
|
||||
go get github.com/axllent/goptimize
|
||||
go install github.com/axllent/goptimize@latest
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
Some ideas for the future:
|
||||
|
||||
- Dry run
|
||||
- Option to copy exif data (how?)
|
||||
|
Loading…
x
Reference in New Issue
Block a user