Cheetah
ResizeCommand.php
Go to the documentation of this file.
1 <?php
2 
4 
6 {
13  public function execute($image)
14  {
15  $width = $this->argument(0)->value();
16  $height = $this->argument(1)->value();
17  $constraints = $this->argument(2)->type('closure')->value();
18 
19  // resize box
20  $resized = $image->getSize()->resize($width, $height, $constraints);
21 
22  // modify image
23  $image->getCore()->scaleImage($resized->getWidth(), $resized->getHeight());
24 
25  return true;
26  }
27 }
php
Intervention\Image\Imagick\Commands\ResizeCommand\execute
execute($image)
Definition: ResizeCommand.php:13
Intervention\Image\Imagick\Commands
Definition: BackupCommand.php:3
Intervention\Image\Commands\AbstractCommand\argument
argument($key)
Definition: AbstractCommand.php:45
Intervention\Image\Imagick\Commands\ResizeCommand
Definition: ResizeCommand.php:6
Intervention\Image\Commands\AbstractCommand
Definition: AbstractCommand.php:6