protected function Trim::process in Imagick 8
File
- src/
Plugin/ ImageToolkit/ Operation/ imagick/ Trim.php, line 34
Class
- Trim
- Defines imagick trim operation.
Namespace
Drupal\imagick\Plugin\ImageToolkit\Operation\imagickCode
protected function process(Imagick $resource, array $arguments) {
$success = $resource
->trimImage($arguments['fuzz']);
// Reset image dimensions
$dimensions = $resource
->getImageGeometry();
$resource
->setImagePage($dimensions['width'], $dimensions['height'], 0, 0);
return $success;
}