0

Clarify optimizeimg docs; add warnings

The validator will now warn if it detects that a crushed output
is fed into something that is not a crusher.

The is_crusher method of an optimizer shall return True if the
optimisation process is lossless, and does try to find optimal
encoding parameters as opposed to only removing unneeded channels
or reducing palettes.
This commit is contained in:
CounterPillow
2014-05-08 20:49:41 +02:00
parent a39c45d473
commit 6d28942626
3 changed files with 34 additions and 9 deletions

View File

@@ -557,7 +557,9 @@ values. The valid configuration keys are listed below.
The option is a list of Optimizer objects, which are then executed in
the order in which they're specified::
# Import the optimizers we need
from optimizeimages import pngnq, optipng
worlds["world"] = "/path/to/world"
renders["daytime"] = {
@@ -566,6 +568,10 @@ values. The valid configuration keys are listed below.
"rendermode":smooth_lighting,
"optimizeimg":[pngnq(sampling=1), optipng(olevel=3)],
}
.. note::
Don't forget to import the optimizers you use in your config file, as shown in the
example above.
Here is a list of supported image optimization programs:
@@ -612,8 +618,9 @@ values. The valid configuration keys are listed below.
**Default:** ``2``
``pngcrush``
pngcrush is very slow and not very good, you should use optipng in probably all cases.
However, Overviewer still allows you to use it because we're nice people like that.
pngcrush, like optipng, is a lossless PNG recompressor. If you are able to do so, it
is recommended to use optipng instead, as it generally yields better results in less
time.
Available settings:
``brute``
@@ -626,10 +633,6 @@ values. The valid configuration keys are listed below.
**Default:** ``False``
.. note::
Don't forget to import the optimizers you use in your settings file, as shown in the
example above.
**Default:** ``[]``
``bgcolor``