Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / imagemagick / src / Plugin / ImageToolkit / Operation / imagemagick / Rotate.php
index f54eeacabcdf08f9ebebd2b8b7b6c72a9503b602..eab120ac89cb4652248c92f86fdd18548f84573d 100644 (file)
@@ -62,15 +62,20 @@ class Rotate extends ImagemagickImageToolkitOperationBase {
    */
   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'],
+    ]);
   }
+
 }