Convolve::arguments() has the following code.

  protected function arguments() {
    return [
      'radius' => [
        'description' => 'The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.',
      ],
      'sigma' => [
        'description' => 'The standard deviation of the Gaussian, in pixels.',
      ],
      'amount' => [
        'description' => 'The fraction of the difference between the original and the blur image that is added back into the original.',
      ],
      'threshold' => [
        'description' => 'The threshold, as a fraction of QuantumRange, needed to apply the difference amount.',
      ],
    ];
  }

Those aren't the arguments the operation uses, which is just a matrix. That is what the process() method uses.

  protected function process(Imagick $resource, array $arguments) {
    $matrix = [];

    foreach(new \RecursiveIteratorIterator(new \RecursiveArrayIterator($arguments['matrix'])) as $value) {
      $matrix[] = $value;
    }

    return $resource->convolveImage($matrix);
  }

The same arguments are referenced from ConvolveImageEffect::defaultConfiguration().

  public function defaultConfiguration() {
    return [
      'radius' => '0',
      'sigma' => '1',
      'amount' => '1.0',
      'threshold' => '0.05',
    ];
  }

Comments

kiamlaluno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review
StatusFileSize
new1.61 KB

bceyssens’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.