Crop.php in Imagick 8        
                          
                  
                        
  
  
  
  
  
File
  src/Plugin/ImageToolkit/Operation/imagick/Crop.php
  
    View source  
  <?php
namespace Drupal\imagick\Plugin\ImageToolkit\Operation\imagick;
use Drupal\system\Plugin\ImageToolkit\Operation\gd\Crop as GdCrop;
use Imagick;
class Crop extends GdCrop {
  use ImagickOperationTrait;
  
  protected function process(Imagick $resource, array $arguments) {
    $success = $resource
      ->cropImage($arguments['width'], $arguments['height'], $arguments['x'], $arguments['y']);
    $resource
      ->setImagePage($arguments['width'], $arguments['height'], 0, 0);
    return $success;
  }
}
 
Classes
        
  
  
      
      
         
      
                  
            Name            | 
                  
            Description           | 
              
    
    
          
                  | 
            Crop           | 
                  
            Defines imagick crop operation.           |