Skip to content

Commit

Permalink
Relicense under GPL
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Dec 5, 2015
1 parent 2dd6079 commit 80d02c8
Show file tree
Hide file tree
Showing 11 changed files with 1,408 additions and 66 deletions.
632 changes: 631 additions & 1 deletion COPYRIGHT

Large diffs are not rendered by default.

33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pngquant 2
# pngquant 2

This is the official `pngquant` and `libimagequant`.

Expand All @@ -9,14 +9,14 @@ Quantized files are often 40-70% smaller than their 24/32-bit version.

This utility works on Linux, Mac OS X and Windows.

##Usage
## Usage

- batch conversion of multiple files: `pngquant *.png`
- Unix-style stdin/stdout chaining: `… | pngquant - | …`

To further reduce file size, try [optipng](http://optipng.sourceforge.net) or [ImageOptim](http://imageoptim.pornel.net).

##Improvements since 1.0
## Improvements since 1.0

Generated files are both smaller and look much better.

Expand All @@ -43,55 +43,58 @@ Generated files are both smaller and look much better.
- multicore support via OpenMP
- quantization moved to standalone libimagequant

##Options
## Options

See `pngquant -h` for full list.

###`--quality min-max`
### `--quality min-max`

`min` and `max` are numbers in range 0 (worst) to 100 (perfect), similar to JPEG. pngquant will use the least amount of colors required to meet or exceed the `max` quality. If conversion results in quality below the `min` quality the image won't be saved (if outputting to stdin, 24-bit original will be output) and pngquant will exit with status code 99.

pngquant --quality=65-80 image.png

###`--ext new.png`
### `--ext new.png`

Set custom extension (suffix) for output filename. By default `-or8.png` or `-fs8.png` is used. If you use `--ext=.png --force` options pngquant will overwrite input files in place (use with caution).

###`-o out.png` or `--output out.png`
### `-o out.png` or `--output out.png`

Writes converted file to the given path. When this option is used only single input file is allowed.

###`--skip-if-larger`
### `--skip-if-larger`

Don't write converted files if the conversion isn't worth it.

###`--speed N`
### `--speed N`

Speed/quality trade-off from 1 (brute-force) to 11 (fastest). The default is 3. Speed 10 has 5% lower quality, but is 8 times faster than the default. Speed 11 disables dithering and lowers compression level.

###`--nofs`
### `--nofs`

Disables Floyd-Steinberg dithering.

###`--floyd=0.5`
### `--floyd=0.5`

Controls level of dithering (0 = none, 1 = full).

###`--posterize bits`
### `--posterize bits`

Reduce precision of the palette by number of bits. Use when the image will be displayed on low-depth screens (e.g. 16-bit displays or compressed textures in ARGB444 format).

###`--version`
### `--version`

Print version information to stdout.

###`-`
### `-`

Read image from stdin and send result to stdout.

###`--`
### `--`

Stops processing of arguments. This allows use of file names that start with `-`. If you're using pngquant in a script, it's advisable to put this before file names:

pngquant $OPTIONS -- "$FILE"

## License

GPL v3 or later, and additional copyright notice must be kept for older parts of the code. See [COPYRIGHT](https://github.com/pornel/pngquant/blob/master/COPYRIGHT) for details.
Loading

0 comments on commit 80d02c8

Please sign in to comment.