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