README.markdown in discourse_image_optim-0.26.1 vs README.markdown in discourse_image_optim-0.26.2
- old
+ new
@@ -9,11 +9,11 @@
# image_optim
Optimize (lossless compress, optionally lossy) images (jpeg, png, gif, svg) using external utilities:
* [advpng](http://advancemame.sourceforge.net/doc-advpng.html) from [AdvanceCOMP](http://advancemame.sourceforge.net/comp-readme.html)
- (will use [zopfli](https://code.google.com/p/zopfli/) on default/maximum level 4)
+(will use [zopfli](https://code.google.com/p/zopfli/) on default/maximum level 4)
* [gifsicle](http://www.lcdf.org/gifsicle/)
* [jhead](http://www.sentex.net/~mwandel/jhead/)
* [jpegoptim](http://www.kokkonen.net/tjko/projects.html)
* [jpeg-recompress](https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress)
* jpegtran from [Independent JPEG Group's JPEG library](http://www.ijg.org/)
@@ -55,15 +55,13 @@
```
With version:
<!---<update-version>-->
-
```ruby
gem 'image_optim', '~> 0.26'
```
-
<!---</update-version>-->
If you want to check latest changes:
```ruby
@@ -241,11 +239,11 @@
image_optim.optimize_images_data(datas)
```
### From rails
-Rails image assets optimization is extracted into [image_optim_rails gem](https://github.com/toy/image_optim_rails).
+Rails image assets optimization is extracted into [image\_optim\_rails gem](https://github.com/toy/image_optim_rails).
## Configuration
Configuration in YAML format will be read and prepended to options from two paths:
@@ -263,95 +261,73 @@
level: 5
```
## Options
-* `:nice` — Nice level, priority of all used tools with higher value meaning lower priority, in range `-20..19`, negative values can be set only if run by root user _(defaults to `10`)_
-* `:threads` — Number of threads or disable _(defaults to number of processors)_
-* `:verbose` — Verbose output _(defaults to `false`)_
-* `:pack` — Require image_optim_pack or disable it, by default image_optim_pack will be used if available, will turn on `:skip-missing-workers` unless explicitly disabled _(defaults to `nil`)_
-* `:skip_missing_workers` — Skip workers with missing or problematic binaries _(defaults to `false`)_
-* `:allow_lossy` — Allow lossy workers and optimizations _(defaults to `false`)_
+* `:nice` — Nice level, priority of all used tools with higher value meaning lower priority, in range `-20..19`, negative values can be set only if run by root user *(defaults to `10`)*
+* `:threads` — Number of threads or disable *(defaults to number of processors)*
+* `:verbose` — Verbose output *(defaults to `false`)*
+* `:pack` — Require image\_optim\_pack or disable it, by default image\_optim\_pack will be used if available, will turn on `:skip-missing-workers` unless explicitly disabled *(defaults to `nil`)*
+* `:skip_missing_workers` — Skip workers with missing or problematic binaries *(defaults to `false`)*
+* `:allow_lossy` — Allow lossy workers and optimizations *(defaults to `false`)*
* `:cache_dir` — Configure cache directory
* `:cache_worker_digests` - Also cache worker digests along with original file digest and worker options: updating workers invalidates cache
-* `:timeout` — Number of seconds before workers are timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
+* `:timeout` - Number of seconds before ImageOptim is timed out.
Worker can be disabled by passing `false` instead of options hash or by setting option `:disable` to `true`.
<!---<worker-options>-->
-
<!-- markdown for worker options is generated by `script/update_worker_options_in_readme` -->
### advpng:
+* `:level` — Compression level: `0` - don't compress, `1` - fast, `2` - normal, `3` - extra, `4` - extreme *(defaults to `4`)*
-* `:level` — Compression level: `0` - don't compress, `1` - fast, `2` - normal, `3` - extra, `4` - extreme _(defaults to `4`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### gifsicle:
-
* `:interlace` — Interlace: `true` - interlace on, `false` - interlace off, `nil` - as is in original image (defaults to running two instances, one with interlace off and one with on)
-* `:level` — Compression level: `1` - light and fast, `2` - normal, `3` - heavy (slower) _(defaults to `3`)_
-* `:careful` — Avoid bugs with some software _(defaults to `false`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
+* `:level` — Compression level: `1` - light and fast, `2` - normal, `3` - heavy (slower) *(defaults to `3`)*
+* `:careful` — Avoid bugs with some software *(defaults to `false`)*
### jhead:
+Worker has no options
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### jpegoptim:
+* `:allow_lossy` — Allow limiting maximum quality *(defaults to `false`)*
+* `:strip` — List of extra markers to strip: `:comments`, `:exif`, `:iptc`, `:icc` or `:all` *(defaults to `:all`)*
+* `:max_quality` — Maximum image quality factor `0`..`100`, ignored in default/lossless mode *(defaults to `100`)*
-* `:allow_lossy` — Allow limiting maximum quality _(defaults to `false`)_
-* `:strip` — List of extra markers to strip: `:comments`, `:exif`, `:iptc`, `:icc` or `:all` _(defaults to `:all`)_
-* `:max_quality` — Maximum image quality factor `0`..`100`, ignored in default/lossless mode _(defaults to `100`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### jpegrecompress:
+* `:allow_lossy` — Allow worker, it is always lossy *(defaults to `false`)*
+* `:quality` — JPEG quality preset: `0` - low, `1` - medium, `2` - high, `3` - veryhigh *(defaults to `3`)*
-* `:allow_lossy` — Allow worker, it is always lossy _(defaults to `false`)_
-* `:quality` — JPEG quality preset: `0` - low, `1` - medium, `2` - high, `3` - veryhigh _(defaults to `3`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### jpegtran:
+* `:copy_chunks` — Copy all chunks *(defaults to `false`)*
+* `:progressive` — Create progressive JPEG file *(defaults to `true`)*
+* `:jpegrescan` — Use jpegtran through jpegrescan, ignore progressive option *(defaults to `true`)*
-* `:copy_chunks` — Copy all chunks _(defaults to `false`)_
-* `:progressive` — Create progressive JPEG file _(defaults to `true`)_
-* `:jpegrescan` — Use jpegtran through jpegrescan, ignore progressive option _(defaults to `false`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### optipng:
+* `:level` — Optimization level preset: `0` is least, `7` is best *(defaults to `6`)*
+* `:interlace` — Interlace: `true` - interlace on, `false` - interlace off, `nil` - as is in original image *(defaults to `false`)*
+* `:strip` — Remove all auxiliary chunks *(defaults to `true`)*
-* `:level` — Optimization level preset: `0` is least, `7` is best _(defaults to `6`)_
-* `:interlace` — Interlace: `true` - interlace on, `false` - interlace off, `nil` - as is in original image _(defaults to `false`)_
-* `:strip` — Remove all auxiliary chunks _(defaults to `true`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### pngcrush:
+* `:chunks` — List of chunks to remove or `:alla` - all except tRNS/transparency or `:allb` - all except tRNS and gAMA/gamma *(defaults to `:alla`)*
+* `:fix` — Fix otherwise fatal conditions such as bad CRCs *(defaults to `false`)*
+* `:brute` — Brute force try all methods, very time-consuming and generally not worthwhile *(defaults to `false`)*
+* `:blacken` — Blacken fully transparent pixels *(defaults to `true`)*
-* `:chunks` — List of chunks to remove or `:alla` - all except tRNS/transparency or `:allb` - all except tRNS and gAMA/gamma _(defaults to `:alla`)_
-* `:fix` — Fix otherwise fatal conditions such as bad CRCs _(defaults to `false`)_
-* `:brute` — Brute force try all methods, very time-consuming and generally not worthwhile _(defaults to `false`)_
-* `:blacken` — Blacken fully transparent pixels _(defaults to `true`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### pngout:
+* `:copy_chunks` — Copy optional chunks *(defaults to `false`)*
+* `:strategy` — Strategy: `0` - xtreme, `1` - intense, `2` - longest Match, `3` - huffman Only, `4` - uncompressed *(defaults to `0`)*
-* `:copy_chunks` — Copy optional chunks _(defaults to `false`)_
-* `:strategy` — Strategy: `0` - xtreme, `1` - intense, `2` - longest Match, `3` - huffman Only, `4` - uncompressed _(defaults to `0`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### pngquant:
+* `:allow_lossy` — Allow quality option *(defaults to `false`)*
+* `:max_colors` — Maximum number of colors to use *(defaults to `256`)*
+* `:quality` — min..max - don't save below min, use less colors below max (both in range `0..100`; in yaml - `!ruby/range 0..100`), ignored in default/lossless mode *(defaults to `100..100`, `0..100` in lossy mode)*
+* `:speed` — speed/quality trade-off: `1` - slow, `3` - default, `11` - fast & rough *(defaults to `3`)*
-* `:allow_lossy` — Allow quality option _(defaults to `false`)_
-* `:max_colors` — Maximum number of colors to use _(defaults to `256`)_
-* `:quality` — min..max - don't save below min, use less colors below max (both in range `0..100`; in yaml - `!ruby/range 0..100`), ignored in default/lossless mode _(defaults to `100..100`, `0..100` in lossy mode)_
-* `:speed` — speed/quality trade-off: `1` - slow, `3` - default, `11` - fast & rough _(defaults to `3`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
-
### svgo:
-
-* `:disable_plugins` — List of plugins to disable _(defaults to `[]`)_
-* `:enable_plugins` — List of plugins to enable _(defaults to `[]`)_
-* `:timeout` — Number of seconds before worker is timed out. Must be greater than 0 to enable timeout. _(defaults to `0`)_
+* `:disable_plugins` — List of plugins to disable *(defaults to `[]`)*
+* `:enable_plugins` — List of plugins to enable *(defaults to `[]`)*
<!---</worker-options>-->
## Contributing