1<?php 2 3namespace Intervention\Image\Gd\Commands; 4 5use Intervention\Image\Commands\AbstractCommand; 6 7class GreyscaleCommand extends AbstractCommand 8{ 9 /** 10 * Turns an image into a greyscale version 11 * 12 * @param \Intervention\Image\Image $image 13 * @return boolean 14 */ 15 public function execute($image) 16 { 17 return imagefilter($image->getCore(), IMG_FILTER_GRAYSCALE); 18 } 19} 20