*/
protected function execute(array $arguments) {
// Rotate.
- $arg = '-background ' . $this->getToolkit()->escapeShellArg($arguments['background']);
+ $arg = '-background ' . $this->escapeArgument($arguments['background']);
$arg .= ' -rotate ' . $arguments['degrees'];
$arg .= ' +repage';
- $this->getToolkit()->addArgument($arg);
+ $this->addArgument($arg);
// Need to resize the image after rotation to make sure it complies with
// the dimensions expected, calculated via the Rectangle class.
$box = new Rectangle($this->getToolkit()->getWidth(), $this->getToolkit()->getHeight());
$box = $box->rotate((float) $arguments['degrees']);
- return $this->getToolkit()->apply('resize', ['width' => $box->getBoundingWidth(), 'height' => $box->getBoundingHeight(), 'filter' => $arguments['resize_filter']]);
+ return $this->getToolkit()->apply('resize', [
+ 'width' => $box->getBoundingWidth(),
+ 'height' => $box->getBoundingHeight(),
+ 'filter' => $arguments['resize_filter'],
+ ]);
}
+
}