Adding interpolation option
This commit is contained in:
parent
7ca6dacb3b
commit
c21bbf13c5
|
@ -41,6 +41,7 @@ class Configuration implements ConfigurationInterface
|
|||
->scalarNode('distortion')->defaultValue(true)->end()
|
||||
->scalarNode('max_front_lines')->defaultValue(null)->end()
|
||||
->scalarNode('max_behind_lines')->defaultValue(null)->end()
|
||||
->scalarNode('interpolation')->defaultValue(true)->end()
|
||||
->arrayNode('background_color')->prototype('scalar')->end()
|
||||
->end()
|
||||
;
|
||||
|
|
|
@ -107,6 +107,8 @@ class CaptchaGenerator
|
|||
$this->builder->setBackgroundColor($color[0], $color[1], $color[2]);
|
||||
}
|
||||
|
||||
$this->builder->setInterpolation($options['interpolation']);
|
||||
|
||||
$fingerprint = isset($options['fingerprint']) ? $options['fingerprint'] : null;
|
||||
|
||||
$content = $this->builder->build(
|
||||
|
|
|
@ -139,6 +139,7 @@ You can define the following configuration options globally or on the CaptchaTyp
|
|||
* **max_front_lines**, **max_behind_lines**: the maximum number of lines to draw on top/behind the image. `0` will draw no lines; `null` will use the default algorithm (the
|
||||
number of lines depends on the size of the image). (default=null)
|
||||
* **background_color**: sets the background color, if you want to force it, this should be an array of r,g &b, for instance [255, 255, 255] will force the background to be white
|
||||
* **interpolation**: enable or disable the interpolation on the captcha
|
||||
|
||||
Example :
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"gregwar/captcha": "v1.0.4"
|
||||
"gregwar/captcha": "v1.0.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
|
|
Loading…
Reference in New Issue