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

0001 <?php
0002 
0003 namespace Intervention\Image\Gd\Commands;
0004 
0005 class PixelateCommand extends \Intervention\Image\Commands\AbstractCommand
0006 {
0007     /**
0008      * Applies a pixelation effect to a given image
0009      *
0010      * @param  \Intervention\Image\Image $image
0011      * @return boolean
0012      */
0013     public function execute($image)
0014     {
0015         $size = $this->argument(0)->type('digit')->value(10);
0016 
0017         return imagefilter($image->getCore(), IMG_FILTER_PIXELATE, $size, true);
0018     }
0019 }