BlurCommand.php 447 B

12345678910111213141516171819
  1. <?php
  2. namespace Intervention\Image\Imagick\Commands;
  3. class BlurCommand extends \Intervention\Image\Commands\AbstractCommand
  4. {
  5. /**
  6. * Applies blur effect on image
  7. *
  8. * @param \Intervention\Image\Image $image
  9. * @return boolean
  10. */
  11. public function execute($image)
  12. {
  13. $amount = $this->argument(0)->between(0, 100)->value(1);
  14. return $image->getCore()->blurImage(1 * $amount, 0.5 * $amount);
  15. }
  16. }