tldr/pages/common/optipng.md

29 lines
625 B
Markdown
Raw Normal View History

2016-01-28 20:47:13 +00:00
# optipng
> PNG file optimization utility.
2019-06-04 10:00:16 +01:00
> More information: <http://optipng.sourceforge.net>.
2016-01-28 20:47:13 +00:00
- Compress a PNG with default settings:
`optipng {{path/to/file.png}}`
2016-01-28 20:47:13 +00:00
- Compress a PNG with the best compression:
2016-01-28 20:47:13 +00:00
`optipng -o{{7}} {{path/to/file.png}}`
2016-01-28 20:47:13 +00:00
- Compress a PNG with the fastest compression:
2016-01-28 20:47:13 +00:00
`optipng -o{{0}} {{path/to/file.png}}`
2016-01-28 20:47:13 +00:00
- Compress a PNG and add interlacing:
`optipng -i {{1}} {{path/to/file.png}}`
- Compress a PNG and preserve all metadata (including file timestamps):
`optipng -preserve {{path/to/file.png}}`
2016-01-28 20:47:13 +00:00
- Compress a PNG and remove all metadata:
`optipng -strip all {{path/to/file.png}}`