File indexing completed on 2025-01-26 05:29:13

0001 <?php
0002 
0003 namespace Intervention\Image\Gd\Commands;
0004 
0005 class BlurCommand extends \Intervention\Image\Commands\AbstractCommand
0006 {
0007     /**
0008      * Applies blur effect on image
0009      *
0010      * @param  \Intervention\Image\Image $image
0011      * @return boolean
0012      */
0013     public function execute($image)
0014     {
0015         $amount = $this->argument(0)->between(0, 100)->value(1);
0016 
0017         for ($i=0; $i < intval($amount); $i++) {
0018             imagefilter($image->getCore(), IMG_FILTER_GAUSSIAN_BLUR);
0019         }
0020 
0021         return true;
0022     }
0023 }